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

env: node\r: No such file or directory #75

Closed
temnoregg opened this issue Sep 9, 2014 · 40 comments
Closed

env: node\r: No such file or directory #75

temnoregg opened this issue Sep 9, 2014 · 40 comments

Comments

@temnoregg
Copy link

Can't run nwbuild

It returns env: node\r: No such file or directory with every execution

nwbuild -r .
env: node\r: No such file or directory

nwbuild -h
env: node\r: No such file or directory

@stevenvachon
Copy link

I had this problem too on OSX. I just opened node-webkit-builder/bin/nwbuild and removed the line break after the shebang and added a new one (line break). That's why the \r is part of the error.

This should work on any OS because you'll be replacing the line break with what your OS expects.

(Edited)

@sahat
Copy link

sahat commented Sep 10, 2014

Same problem here on Mac OS X.

@lp76
Copy link

lp76 commented Sep 10, 2014

Same problem here on Mac OS X 10.9

@temnoregg
Copy link
Author

@stevenvachon doesn't work for me

@stevenvachon
Copy link

Oops, I'd missed something. Edited original comment.

@lp76
Copy link

lp76 commented Sep 10, 2014

I resolved this issue converting the line ending from DOS to UNIX format.
In vim I used this command:
:set ff=unix

@temnoregg
Copy link
Author

@lp76 this works for me

@1j01
Copy link
Contributor

1j01 commented Sep 14, 2014

The project is missing a .gitattributes file. Since this is a public repository used by people, we can't (shoudn't) rewrite history, so it'll need to be added with a commit that changes all the line endings in most of the files. That would make it hard for current pull requests to be merged (so maybe it should wait), but afterwards it might avoid other problems with pull requests..
A .gitattributes file with * text=auto plus the unavoidable commit should fix this issue.

@superRaytin
Copy link

Same problem here on Mac OS X 10.9.4

@jwchang0206
Copy link

@lp76 yeah that :set ff=unix made mine work on Mac 👍

@azu
Copy link

azu commented Oct 9, 2014

Same problem here on Mac OS X 10.9.5 and Travis CI.

@albinekb
Copy link

Same problem here on Mac OS X 10.10.

@adam-lynch
Copy link
Contributor

@1j01 sure that'll fix it yeah?

@1j01
Copy link
Contributor

1j01 commented Oct 22, 2014

@adam-lynch Simply adding the .gitattributes file won't (necessarily) normalize the line-endings in existing files. It's governed by cryptic voodoo. There usually needs to be a commit that changes all the line endings in most of the files. It probably depends on what line-endings happen to be in the files currently.

@adam-lynch
Copy link
Contributor

@1j01 I've done it before (from https://help.github.com/articles/dealing-with-line-endings/) but just asking if you're sure this is because of line-endings. I can look into normalizing them soon

@tamimibrahim
Copy link

command nwbuild -r test/ output : No such file or directory !! Ubuntu 12.04

@1j01
Copy link
Contributor

1j01 commented Oct 23, 2014

@adam-lynch I don't know. People have apparently been fixing it by changing line endings, so I figure that's the issue. I haven't experienced the issue myself, but it makes sense.

@superRaytin
Copy link

@stevenvachon This works for me :)

@adam-lynch
Copy link
Contributor

Closing in favour of #105

@stephan-nordnes-eriksen

+1 for this. Have the same issue. Can't build my node-webkit anymore from osx 10.10.1.

@stephan-nordnes-eriksen

By the way, for anyone having this issue, you might have to fix the file /usr/local/bin/nwbuild.

You can do this:

brew install tofrodos
fromdos /usr/local/bin/nwbuild

tofrodos will convert \r to \n and back (fromdos/todos).

@siuying
Copy link

siuying commented Dec 14, 2014

before the actual fix, one can use following command:

node ./node_modules/.bin/nwbuild

@ghost
Copy link

ghost commented Jan 16, 2017

When I run npm install -g iothub-explorer on Ubuntu 16.04, I get the same error. Also, the executable is called nodejs and not node here so we needed to create a symlink to make it work.

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

No branches or pull requests