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

Error prevents app from starting #2

Closed
ungoldman opened this issue Apr 2, 2013 · 9 comments
Closed

Error prevents app from starting #2

ungoldman opened this issue Apr 2, 2013 · 9 comments

Comments

@ungoldman
Copy link

I keep getting the same cryptic error when trying to start the app. I've tried installing by cloning the repo, installing dependencies and running npm start as specified in the readme. I tried installing grunt globally, running index.js with nodemon or just plain node, all with the same result.

~/dev/lab/temp/rendr-app-template (master) $ npm start

> rendr-app-template@0.0.1 start /Users/ng/dev/lab/temp/rendr-app-template
> DEBUG=app:* node index.js


/Users/ng/dev/lab/temp/rendr-app-template/index.js:29
  if (err) throw err;
                 ^
Error: grunt exited with code:127
    at ChildProcess.compileAssets (/Users/ng/dev/lab/temp/rendr-app-template/index.js:22:13)
    at ChildProcess.EventEmitter.emit (events.js:91:17)
    at Process._handle.onexit (child_process.js:674:10)
npm ERR! rendr-app-template@0.0.1 start: `DEBUG=app:* node index.js`
npm ERR! `sh "-c" "DEBUG=app:* node index.js"` failed with 1
npm ERR!
npm ERR! Failed at the rendr-app-template@0.0.1 start script.
npm ERR! This is most likely a problem with the rendr-app-template package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     DEBUG=app:* node index.js
npm ERR! You can get their info via:
npm ERR!     npm owner ls rendr-app-template
npm ERR! There is likely additional logging output above.

npm ERR! System Darwin 11.4.2
npm ERR! command "node" "/usr/local/bin/npm" "start"
npm ERR! cwd /Users/ng/dev/lab/temp/rendr-app-template
npm ERR! node -v v0.8.2
npm ERR! npm -v 1.1.46
npm ERR! code ELIFECYCLE
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR!     /Users/ng/dev/lab/temp/rendr-app-template/npm-debug.log
npm ERR! not ok code 0

Grunt keeps exiting with an error code of 127. Not much other debug info available.

Here's my npm-debug.log:

0 info it worked if it ends with ok
1 verbose cli [ 'node', '/usr/local/bin/npm', 'start' ]
2 info using npm@1.1.46
3 info using node@v0.8.2
4 verbose config file /Users/ng/.npmrc
5 verbose config file /usr/local/etc/npmrc
6 verbose config file /usr/local/lib/node_modules/npm/npmrc
7 verbose read json /Users/ng/dev/lab/temp/rendr-app-template/package.json
8 verbose run-script [ 'prestart', 'start', 'poststart' ]
9 info prestart rendr-app-template@0.0.1
10 info start rendr-app-template@0.0.1
11 verbose unsafe-perm in lifecycle true
12 silly exec sh "-c" "DEBUG=app:* node index.js"
13 silly sh,-c,DEBUG=app:* node index.js,/Users/ng/dev/lab/temp/rendr-app-template spawning
14 info rendr-app-template@0.0.1 Failed to exec start script
15 error rendr-app-template@0.0.1 start: `DEBUG=app:* node index.js`
15 error `sh "-c" "DEBUG=app:* node index.js"` failed with 1
16 error Failed at the rendr-app-template@0.0.1 start script.
16 error This is most likely a problem with the rendr-app-template package,
16 error not with npm itself.
16 error Tell the author that this fails on your system:
16 error     DEBUG=app:* node index.js
16 error You can get their info via:
16 error     npm owner ls rendr-app-template
16 error There is likely additional logging output above.
17 error System Darwin 11.4.2
18 error command "node" "/usr/local/bin/npm" "start"
19 error cwd /Users/ng/dev/lab/temp/rendr-app-template
20 error node -v v0.8.2
21 error npm -v 1.1.46
22 error code ELIFECYCLE
23 verbose exit [ 1, true ]

Any idea what might be causing this?

@emecell
Copy link

emecell commented Apr 2, 2013

If you've had node installed via homebrew for a while and just upgraded like I did, you may need to append /usr/local/share/npm/bin to your $PATH. brew info node tells you about this change.

@scottrblock
Copy link

/usr/local/share/npm/bin is in my $PATH (as brew info node told me to do), but I am still receiving the same error.

> rendr-app-template@0.0.1 start /Users/sblock/projects/rendr-app-template
> DEBUG=app:* node index.js


/Users/sblock/projects/rendr-app-template/index.js:29
  if (err) throw err;
                 ^
Error: grunt exited with code:127
    at ChildProcess.compileAssets (/Users/sblock/projects/rendr-app-template/index.js:22:13)
    at ChildProcess.EventEmitter.emit (events.js:91:17)
    at Process._handle.onexit (child_process.js:674:10)
npm ERR! rendr-app-template@0.0.1 start: `DEBUG=app:* node index.js`
npm ERR! `sh "-c" "DEBUG=app:* node index.js"` failed with 1
npm ERR! 
npm ERR! Failed at the rendr-app-template@0.0.1 start script.
npm ERR! This is most likely a problem with the rendr-app-template package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     DEBUG=app:* node index.js
npm ERR! You can get their info via:
npm ERR!     npm owner ls rendr-app-template
npm ERR! There is likely additional logging output above.

npm ERR! System Darwin 11.4.0
npm ERR! command "/usr/local/Cellar/node/0.8.8/bin/node" "/usr/local/bin/npm" "start"
npm ERR! cwd /Users/sblock/projects/rendr-app-template
npm ERR! node -v v0.8.8
npm ERR! npm -v 1.1.59
npm ERR! code ELIFECYCLE
npm ERR! 
npm ERR! Additional logging details can be found in:
npm ERR!     /Users/sblock/projects/rendr-app-template/npm-debug.log
npm ERR! not ok code 0

And my npm-debug.log

0 info it worked if it ends with ok
1 verbose cli [ '/usr/local/Cellar/node/0.8.8/bin/node',
1 verbose cli   '/usr/local/bin/npm',
1 verbose cli   'start' ]
2 info using npm@1.1.59
3 info using node@v0.8.8
4 verbose read json /Users/sblock/projects/rendr-app-template/package.json
5 verbose run-script [ 'prestart', 'start', 'poststart' ]
6 info prestart rendr-app-template@0.0.1
7 info start rendr-app-template@0.0.1
8 verbose unsafe-perm in lifecycle true
9 silly exec sh "-c" "DEBUG=app:* node index.js"
10 silly sh,-c,DEBUG=app:* node index.js,/Users/sblock/projects/rendr-app-template spawning
11 info rendr-app-template@0.0.1 Failed to exec start script
12 error rendr-app-template@0.0.1 start: `DEBUG=app:* node index.js`
12 error `sh "-c" "DEBUG=app:* node index.js"` failed with 1
13 error Failed at the rendr-app-template@0.0.1 start script.
13 error This is most likely a problem with the rendr-app-template package,
13 error not with npm itself.
13 error Tell the author that this fails on your system:
13 error     DEBUG=app:* node index.js
13 error You can get their info via:
13 error     npm owner ls rendr-app-template
13 error There is likely additional logging output above.
14 error System Darwin 11.4.0
15 error command "/usr/local/Cellar/node/0.8.8/bin/node" "/usr/local/bin/npm" "start"
16 error cwd /Users/sblock/projects/rendr-app-template
17 error node -v v0.8.8
18 error npm -v 1.1.59
19 error code ELIFECYCLE
20 verbose exit [ 1, true ]

@zdwalter
Copy link

zdwalter commented Apr 2, 2013

I found a solution:
see http://gruntjs.com/getting-started

npm uninstall -g grunt
npm install -g grunt-cli

@dylanharrington
Copy link

@zdwalter awesome, that worked for me. thanks!

@scottrblock
Copy link

@zdwalter worked for me, thanks so much!

@ungoldman
Copy link
Author

Thanks @zdwalter! @airbnb folks, does this mean grunt-cli should be a package.json dependency, or is something else going on?

@spikebrehm
Copy link
Member

Hmm, Grunt wants you to install it with -g, which means it should be in package.json. I'll add something to the README.

@spikebrehm
Copy link
Member

I've added 'grunt-cli' to the package.json; is that poor practice, because it should be installed with -g? 681df30

@ungoldman
Copy link
Author

Would probably be better to keep it out of dependencies and add a note to the README alerting users that grunt-cli needs to be installed globally.

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

6 participants