Http-server: env: node\r: No such file or directory in version 0.11.0

Created on 10 Jan 2018  路  6Comments  路  Source: http-party/http-server

Getting this error message on Mac OS and in docker container with FROM node:8.5 as soon as it was built with version 0.11.0. Specifying @0.10.0 resolves the issue.

please-confirm

Most helpful comment

The shebang line ends with DOS line break, which makes env to think that the executable is node\r.

All 6 comments

The shebang line ends with DOS line break, which makes env to think that the executable is node\r.

Strangely enough a git checkout doesn't show the \r character:

$ xxd bin/http-server |head -2
00000000: 2321 2f75 7372 2f62 696e 2f65 6e76 206e  #!/usr/bin/env n
00000010: 6f64 650a 0a27 7573 6520 7374 7269 6374  ode..'use strict

Something todo with git's mangling of line endings?

It's possible that the npm publish command processed the line endings differently...apparently...

Git is juggling them properly, but npm may not be.

Let me see what I can sort out. Sorry folks.

Yep...That's the cause: https://github.com/npm/npm/issues/12371

I'll get an 0.11.1 published shortly.

Just pushed 0.11.1 to npm.

Note: there are no visible changes to the repo contents other than the version number bump--because git was correct all along...

I'll await confirmation on this one before closing. Cheers!

I had rolled back locally (OSX) to 0.10.0 and it worked. I just uninstalled and sanity-checked that 0.11.0 does not work and presents above error, then uninstalled again. Just installed 0.11.1 and it works great.

Thanks for the quick turnaround!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ducklord picture ducklord  路  5Comments

dKab picture dKab  路  7Comments

ghost picture ghost  路  4Comments

jondlm picture jondlm  路  6Comments

gerkirill picture gerkirill  路  3Comments