-
Notifications
You must be signed in to change notification settings - Fork 14
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
Using the npm published version of nano-server on a Unix-based system fails #7
Comments
Oh! Thanks for looking into this. It's funny. It seems to work fine on Linux for me, but not on Mac. Either way, I'll republish from a Linux machine today or tomorrow, so hopefully that will fix this. |
Oh, so it works on Linux… seems like I was a bit over-zealous by saying "UNIX-based systems"! |
Oh, wait... you were right. I was using an old, Linux-published version. I just did an update (to a version I published in Windows) and now it fails. I'll fix the title of this thread and try to re-publish today. |
@PaulMougel I just published an update to NPM. Can you verify that it works for you? |
👍 |
While trying to use
nano-server
to serve static files for Brain Browser:This happens because the files are saved in DOS format (see npm/npm#2097), which unfortunately screws the shebang…
Edit: I tried to fork the repository and fix the line-endings, but it turns out they are fine! Only the files published on npm are messed up. So I guess re-publishing from a UNIX computer should be enough to fix the issue.
For people encountering the same issue, here is how I fixed it.
The package was installed using
npm i -g nano-server
, so I edited the file where the program was loaded from:just enter
:set ff=unix
, save the file and voilà!The text was updated successfully, but these errors were encountered: