-
Notifications
You must be signed in to change notification settings - Fork 68
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
/usr/bin/env: ‘node\r’: No such file or directory #101
Comments
I bet we should probably add a |
Is that respected by npm too? The encoding in the file checked in to git is still unix based from what I see. I can take a quick look into gitattributes |
good point, you're probably right. I don't understand why npm isn't just copying the file wholesale I suppose |
Yeah I can only guess that the file was open in an editor before publishing and it published an unstaged change? Very peculiar though - i've never seen this before. It looks like we could normalize it with an editorconfig:
|
I can make a PR to add this if you like. It might require resaving any/all files. fwiw when I did change the line endings using |
editorconfig is a good thing and I put it in a lot of projects, but most editors don't look at it by default |
we should also add a gitattributes file, one of those tickets you posted said that fixed their issue |
ok, I can do this. Give me a few mins and I'll make a PR |
Ah! Sorry everyone. I don't even open up the code in my editor in my machine. I cloned, then published. Sorry for this... |
I'll check my git settings...I thought I told it to respect line endings and such. |
No worries @dgautsch, I don't think it's your fault. Pretty unexpected. Could you publish 2.6.1 when you get a chance? |
@Ianfeather published, can you try again? |
Will do |
Sorry for the delay. GH went down and I got distracted. Same issue with 2.6.1 :( I can resolve it in the same way manually too. Are you able to reproduce this locally? I can reproduce this by npm installing to a fresh directory and running |
@Ianfeather I know this won't run on windows because I had to fix it in my UI feature branch. So i'm not sure I can reproduce on my machine. This path |
Hey @dgautsch, did you just publish 2.6.0 from a windows machine?
bin/npm-register
has been re-encoded with\r
for line returns and this is causing the error above. There are similar issues across many projects so it seems to be fairly common, and fixed by specifying encoding:abrjagad/npm-module-stats#1
nwutils/nw-builder#105
I was able to verify the fix by opening the file and setting line endings to unix
:set ff=unix
.I also verified that 2.5.5 worked fine.
Quite a strange bug given that file hasn't changed but perhaps you reopened it before publishing 2.6.0?
The text was updated successfully, but these errors were encountered: