Skip to content
This repository

Unable to scaffold with -webapp (master) & yo (beta6) #92

addyosmani opened this Issue · 13 comments

6 participants

Addy Osmani Stephen Sawchuk John Reading Anthony Bull Paul Irish Artur Nowak
Addy Osmani

I've tried this a few times, after having cleaned the npm cache and uninstalled everything. Consistently dies during yo webapp with:

pre-build test passed successfully, skipping build...
npm http GET
npm http GET
npm http GET
npm http 304
npm http 304
npm http 304
npm http GET
npm http GET
npm http 304
npm http 304
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR!     /Users/addyo/projects/yeoman-testing/app/npm-debug.log
npm ERR! not ok code 0

Relevant output from npm-debug:

16479 info postuninstall grunt-mocha@0.3.4
16480 error phantomjs@1.9.1-0 install: `node install.js`
16480 error `sh "-c" "node install.js"` failed with 1
16481 error Failed at the phantomjs@1.9.1-0 install script.
16481 error This is most likely a problem with the phantomjs package,
16481 error not with npm itself.
16481 error Tell the author that this fails on your system:
16481 error     node install.js
16481 error You can get their info via:
16481 error     npm owner ls phantomjs
16481 error There is likely additional logging output above.
16482 error System Darwin 12.3.0
16483 error command "node" "/usr/local/bin/npm" "install"
16484 error cwd /Users/addyo/projects/yeoman-testing/app
16485 error node -v v0.8.6
16486 error npm -v 1.1.48
16487 error code ELIFECYCLE
16488 verbose exit [ 1, true ]
Addy Osmani

Weird. Tried this again, this time saying 'N' to all prompts and noticed that the grunt output includes:

addyo at addyo-macbookair3 in ~/projects/yeoman-testing/app
$ grunt
Loading "autoprefixer.js" tasks...ERROR
>> Error: Cannot find module 'autoprefixer'
>> Local Npm module "grunt-mocha" not found. Is it installed?

Is there a reason Autoprefixer is being used here even when a user says no to "Would you like to use autoprefixer for your CSS?: No", @passy @sindresorhus?

Addy Osmani

Confirmed this is sadly still an issue using 0.11.4 of the generator system and generator-webapp 0.2.2 : /

Stephen Sawchuk

My results are a little different:

> phantomjs@1.9.1-0 install /Users/stephen/dev/play/3547/node_modules/grunt-mocha/node_modules/grunt-lib-phantomjs/node_modules/phantomjs
> node install.js
Phantom installation failed Error: ENOENT, no such file or directory '/Users/stephen/dev/play/3547/node_modules/grunt-mocha/node_modules/grunt-lib-phantomjs/node_modules/phantomjs/lib/phantom/bin/phantomjs'
    at Object.fs.statSync (fs.js:684:18)
    at fixFilePermissions (/Users/stephen/dev/play/3547/node_modules/grunt-mocha/node_modules/grunt-lib-phantomjs/node_modules/phantomjs/install.js:220:19)
    at Promise._successFn (/Users/stephen/dev/play/3547/node_modules/grunt-mocha/node_modules/grunt-lib-phantomjs/node_modules/phantomjs/install.js:72:12)
    at Promise._withInput (/Users/stephen/dev/play/3547/node_modules/grunt-mocha/node_modules/grunt-lib-phantomjs/node_modules/phantomjs/node_modules/kew/kew.js:204:25)
    at Promise.resolve (/Users/stephen/dev/play/3547/node_modules/grunt-mocha/node_modules/grunt-lib-phantomjs/node_modules/phantomjs/node_modules/kew/kew.js:92:25)
    at resolver (/Users/stephen/dev/play/3547/node_modules/grunt-mocha/node_modules/grunt-lib-phantomjs/node_modules/phantomjs/node_modules/kew/kew.js:264:17)
    at cb (/Users/stephen/dev/play/3547/node_modules/grunt-mocha/node_modules/grunt-lib-phantomjs/node_modules/phantomjs/node_modules/ncp/lib/ncp.js:217:38)
    at /Users/stephen/dev/play/3547/node_modules/grunt-mocha/node_modules/grunt-lib-phantomjs/node_modules/phantomjs/node_modules/ncp/lib/ncp.js:142:14
    at Object.oncomplete (fs.js:107:15)
Stephen Sawchuk

npm cache clean and a system restart for good measure fixed this up for me.

Tested with generator-webapp master & yeoman-generator master, as well as 0.11.4.

John Reading

:+1: same issues npm cache clean no help. Is this related to qunit?

John Reading

Looks like this is documented here:

npm install grunt-mocha fixed it for me.

Addy Osmani

@stephenplusplus Did you require any fixes to be made with the grunt-mocha install step mentioned above? I assume not. This is a weird one. @passy have you run into any similar challenges with master?

Stephen Sawchuk

@addyosmani It may have happened behind the scenes. My system is a tangled web of versions and modules. I haven't been able to reproduce since.

John Reading

This might be a rabbithole, but I noticed a similiar issue in the jquery plugin generator. It was related to qunit.


I think there's some dep confusion in phantom, qunit, mocha & yeoman.

Anthony Bull

Ran into similar issue with generator-ember. Console output:

phantomjs@1.9.1-0 install /usr/local/share/npm/lib/node_modules/grunt-mocha/node_modules/grunt-lib-phantomjs/node_modules/phantomjs
node install.js
Phantom installation failed Error: ENOENT, no such file or directory '/usr/local/share/npm/lib/node_modules/grunt-mocha/node_modules/grunt-lib-phantomjs/node_modules/phantomjs/lib/phantom/bin/phantomjs'"

npm install grunt-mocha didn't work for me, had to use sudo as proposed by @gilluminate in gruntjs/grunt-lib-phantomjs#22


$ yo --version

Addy Osmani

Closing for now. To confirm: I was able to get around at least the scaffolding issues by doing a completely fresh install and then restarting. We are working on nailing down the related issues that caused this to be needed.

Paul Irish

Hit this as well. Same situation as @inkredabull. sudo to solve.

Sindre Sorhus sindresorhus referenced this issue in yeoman/generator-ember

Really fix Mocha issue #68

Artur Nowak
anowak commented

If 'sudo solution' is not working for you, please note that npm fails with the same error if bzip2 is not installed (required to unpack PhantomJS tarball).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.