Skip to content

Conversation

@euleong
Copy link

@euleong euleong commented Nov 18, 2025

Fixes ERR_UNKNOWN_FILE_EXTENSION error when running snapai with Node.js 18+. The package uses "type": "module" but the bin file lacked a file extension, which is required for ES modules in Node.js.

Changes:

  • Renamed bin/snapai to bin/snapai.js
  • Updated package.json bin field to point to ./bin/snapai.js
  • Updated files array to include bin/snapai.js

Tested with Node.js v20.5.0 and v16.20.2 - both work correctly after fix.

Fixes ERR_UNKNOWN_FILE_EXTENSION error when running snapai with Node.js 18+.
The package uses "type": "module" but the bin file lacked a file extension,
which is required for ES modules in Node.js.

Changes:
- Renamed bin/snapai to bin/snapai.js
- Updated package.json bin field to point to ./bin/snapai.js
- Updated files array to include bin/snapai.js

Tested with Node.js v20.5.0 and v16.20.2 - both work correctly after fix.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant