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

"node\r: No such file or directory" #1

Closed
ejfrancis opened this issue Sep 15, 2016 · 4 comments
Closed

"node\r: No such file or directory" #1

ejfrancis opened this issue Sep 15, 2016 · 4 comments

Comments

@ejfrancis
Copy link

ejfrancis commented Sep 15, 2016

OSX v10.10.5
node v6.2.2
electron v1.3.5

Thanks for the package @enlight! I just tried running it and I'm seeing this error. My package.json scripts is just like your example

    "inspect-main": "electron-inspector",

and when I run it I get this:

npm run inspect-main

> [email protected] inspect-main /Users/efrancis/devel/DEVGRU/Atlas-Web
> electron-inspector

env: node\r: No such file or directory

npm ERR! Darwin 14.5.0
npm ERR! argv "/Users/efrancis/.nvm/versions/node/v6.2.2/bin/node" "/Users/efrancis/.nvm/versions/node/v6.2.2/bin/npm" "run" "inspect-main"
npm ERR! node v6.2.2
npm ERR! npm  v3.10.5
npm ERR! file sh
npm ERR! code ELIFECYCLE
npm ERR! errno ENOENT
npm ERR! syscall spawn
npm ERR! [email protected] inspect-main: `electron-inspector`
npm ERR! spawn ENOENT
npm ERR!
npm ERR! Failed at the [email protected] inspect-main script 'electron-inspector'.

and here is the full npm-debug.log content

0 info it worked if it ends with ok
1 verbose cli [ '/Users/efrancis/.nvm/versions/node/v6.2.2/bin/node',
1 verbose cli   '/Users/efrancis/.nvm/versions/node/v6.2.2/bin/npm',
1 verbose cli   'run',
1 verbose cli   'inspect-main' ]
2 info using [email protected]
3 info using [email protected]
4 verbose run-script [ 'preinspect-main', 'inspect-main', 'postinspect-main' ]
5 info lifecycle [email protected]~preinspect-main: [email protected]
6 silly lifecycle [email protected]~preinspect-main: no script for preinspect-main, continuing
7 info lifecycle [email protected]~inspect-main: [email protected]
8 verbose lifecycle [email protected]~inspect-main: unsafe-perm in lifecycle true
9 verbose lifecycle [email protected]~inspect-main: PATH: /Users/efrancis/.nvm/versions/node/v6.2.2/lib/node_modules/npm/bin/node-gyp-bin:/Users/efrancis/devel/DEVGRU/Atlas-Web/node_modules/.bin:/Users/efrancis/.nvm/versions/node/v6.2.2/bin:/Users/efrancis/.nvm/versions/node/v6.2.2/bin:/Library/Java/JavaVirtualMachines/jdk1.8.0_102.jdk/Contents/Home//bin:/usr/local/sbin:/usr/local/apache-maven/apache-maven-3.2.5/bin:/usr/local/apache-maven/apache-maven-3.2.5/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin
10 verbose lifecycle [email protected]~inspect-main: CWD: /Users/efrancis/devel/DEVGRU/Atlas-Web
11 silly lifecycle [email protected]~inspect-main: Args: [ '-c', 'electron-inspector' ]
12 info lifecycle [email protected]~inspect-main: Failed to exec inspect-main script
13 verbose stack Error: [email protected] inspect-main: `electron-inspector`
13 verbose stack spawn ENOENT
13 verbose stack     at ChildProcess.<anonymous> (/Users/efrancis/.nvm/versions/node/v6.2.2/lib/node_modules/npm/lib/utils/spawn.js:33:16)
13 verbose stack     at emitTwo (events.js:106:13)
13 verbose stack     at ChildProcess.emit (events.js:191:7)
13 verbose stack     at maybeClose (internal/child_process.js:852:16)
13 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:215:5)
14 verbose pkgid [email protected]
15 verbose cwd /Users/efrancis/devel/DEVGRU/Atlas-Web
16 error Darwin 14.5.0
17 error argv "/Users/efrancis/.nvm/versions/node/v6.2.2/bin/node" "/Users/efrancis/.nvm/versions/node/v6.2.2/bin/npm" "run" "inspect-main"
18 error node v6.2.2
19 error npm  v3.10.5
20 error file sh
21 error code ELIFECYCLE
22 error errno ENOENT
23 error syscall spawn
24 error [email protected] inspect-main: `electron-inspector`
24 error spawn ENOENT
25 error Failed at the [email protected] inspect-main script 'electron-inspector'.
25 error Make sure you have the latest version of node.js and npm installed.
25 error If you do, this is most likely a problem with the electron-react-boilerplate package,
25 error not with npm itself.
25 error Tell the author that this fails on your system:
25 error     electron-inspector
25 error You can get information on how to open an issue for this project with:
25 error     npm bugs electron-react-boilerplate
25 error Or if that isn't available, you can get their info via:
25 error     npm owner ls electron-react-boilerplate
25 error There is likely additional logging output above.
26 verbose exit [ 1, true ]

@enlight
Copy link
Owner

enlight commented Sep 15, 2016

Can you check if electron-inspector exists in the node_modules/.bin directory? If it does can you check what sort of line terminator is used on the first line of the file? I'm wondering if it's the same issue described in https://stackoverflow.com/questions/20483833/yeoman-returns-env-node-r-no-such-file-or-directory

@enlight
Copy link
Owner

enlight commented Sep 15, 2016

OK, I suspect it's this NPM bug. I'll push out a fix in a minute.

@enlight
Copy link
Owner

enlight commented Sep 15, 2016

OK, v0.1.2 is published, hopefully that solves this particular problem for you.

@ejfrancis
Copy link
Author

yup that fixed it, thanks for the quick response. you just made my day a bit easier

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

2 participants