Skip to content

Instantly share code, notes, and snippets.

View bencelaszlo's full-sized avatar

Bence László bencelaszlo

View GitHub Profile
@sindresorhus
sindresorhus / esm-package.md
Last active December 10, 2025 13:22
Pure ESM package

Pure ESM package

The package that linked you here is now pure ESM. It cannot be require()'d from CommonJS.

This means you have the following choices:

  1. Use ESM yourself. (preferred)
    Use import foo from 'foo' instead of const foo = require('foo') to import the package. You also need to put "type": "module" in your package.json and more. Follow the below guide.
  2. If the package is used in an async context, you could use await import(…) from CommonJS instead of require(…).
  3. Stay on the existing version of the package until you can move to ESM.
@raulmangolin
raulmangolin / Codes.md
Last active December 20, 2021 10:45
Facebook Error Codes
Code Message Info
0 Success
1 API Unknown Possibly a temporary issue due to downtime. Wait and retry the operation. If it occurs again, check you are requesting an existing API.
2 API Service Temporary issue due to downtime. Wait and retry the operation.
3 Unknown method
4 API Too Many Calls Temporary issue due to throttling. Wait and retry the operation, or examine your API request volume.
5 Unauthorized source IP address
8 This method requires an