Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Running via npx results in TypeError [ERR_UNKNOWN_FILE_EXTENSION] #145

Open
terrablue opened this issue Aug 12, 2022 · 1 comment
Open
Labels
bug Something isn't working

Comments

@terrablue
Copy link

Describe the bug
I ran npx share-file-systems. Even though this is not explicitly documented, my naive expectation was that the application would start. I'm not sure if this is simply a missing feature or an actual bug.

This results in
TypeError [ERR_UNKNOWN_FILE_EXTENSION]: Unknown file extension "" for $HOME/.npm/_npx/3a4ef2902d19fd14/node_modules/share-file-systems/bin/share-files. Loading extensionless files is not supported inside of "type":"module" package.json contexts. The package.json file $HOME/.npm/_npx/3a4ef2902d19fd14/node_modules/share-file-systems/package.json caused this "type":"module" context. Try changing $HOME/.npm/_npx/3a4ef2902d19fd14/node_modules/share-file-systems/bin/share-files to have a file extension. Note the "bin" field of package.json can point to a file with an extension, for example {"type":"module","bin":{"share-files":"./bin/share-files.js"}}

To Reproduce
Steps to reproduce the behavior:

  1. Open terminal in any directory.
  2. Run npx share-file-systems.

Expected behavior
The application should start.

Desktop (please complete the following information):

  • OS: Arch Linux
  • Browser: Firefox/Chromium
  • Application Version: latest as far as I can tell

Additional context
As it appears from the error message, simply changing the ending of the file in .bin to .js instead of extensionless should solve the issue.

@terrablue terrablue added the bug Something isn't working label Aug 12, 2022
@prettydiff
Copy link
Owner

I need to research a few things:

  • install the page via npm install into a specified directory without creating node_modules
  • potentially avoiding sudo on linux using ngrok
  • also research possibility of pointing domain to ip 127.0.0.1 in public dns records for both ipv4 and ipv6 records

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants