generator-angular icon indicating copy to clipboard operation
generator-angular copied to clipboard

Fresh install of node.js/npm: grunt fails on unmet dependencies

Open avalonabecker opened this issue 12 years ago • 4 comments

With a clean install of node and npm, I'd expect generator-angular to include all required packages in packages.json - are a few packages missing?

  1. I completely wiped my node.js of packages, and deleted the application
  2. compiled and installed locally v0.10.32 of node
  3. npm install -g generator-angular
  4. yo angular myproject STDERR: (truncated for brevity) 10900 error Darwin 13.4.0 10901 error argv "node" "~/localuser/bin/nodejs/bin/npm" "install" "karma-phantomjs-launcher" "karma-jasmine" "grunt-karma" "--save-dev" 10902 error node v0.10.32 10903 error npm v2.0.2 10904 error path ~/localuser/Development/myproject/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/lib/action_container.js 10905 error code ENOENT 10906 error errno 34 10907 error ENOENT, lstat '~/localuser/Development/myproject/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/lib/action_container.js' 10908 error If you need help, you may report this error at: 10908 error http://github.com/npm/npm/issues 10909 verbose exit [ 34, true ]
  5. grunt serve STDERR: (truncated for brevity) Error: Cannot find module 'coffee-script' Error: Cannot find module 'underscore.string'
  6. npm list STDOUT: npm ERR! extraneous: [email protected] ~/localuser/Development/myproject/node_modules/karma-jasmine npm ERR! extraneous: [email protected] ~/localuser/Development/myproject/node_modules/grunt-karma npm ERR! invalid: [email protected] ~/localuser/Development/myproject/node_modules/grunt/node_modules/lodash npm ERR! missing: esprima@~ 1.0.2, required by [email protected] npm ERR! missing: lodash@^2.4.1, required by [email protected] npm ERR! missing: lodash@~2.4.1, required by [email protected] npm ERR! extraneous: [email protected] ~/localuser/Development/myproject/node_modules/karma npm ERR! extraneous: [email protected] ~/localuser/Development/myproject/node_modules/karma-phantomjs-launcher npm ERR! missing: seek-bzip@^1.0.3, required by [email protected] npm ERR! missing: tar@^1.0.0, required by [email protected] npm ERR! missing: tar@^1.0.0, required by [email protected] npm ERR! missing: tar@^1.0.0, required by [email protected] npm ERR! missing: punycode@>=0.2.0, required by [email protected]
  7. Added missing packages to package.json (also needed [email protected], underscore.string)
  8. npm install
  9. npm list STDOUT: npm ERR! extraneous: [email protected] /Users/abembecker/Development/DisneyBits/node_modules/karma-jasmine npm ERR! extraneous: [email protected] /Users/abembecker/Development/DisneyBits/node_modules/grunt-karma npm ERR! invalid: [email protected] /Users/abembecker/Development/DisneyBits/node_modules/grunt/node_modules/lodash npm ERR! extraneous: [email protected] /Users/abembecker/Development/DisneyBits/node_modules/karma npm ERR! extraneous: [email protected] /Users/abembecker/Development/DisneyBits/node_modules/karma-phantomjs-launcher npm ERR! missing: seek-bzip@^1.0.3, required by [email protected] npm ERR! missing: tar@^1.0.0, required by [email protected] npm ERR! missing: tar@^1.0.0, required by [email protected] npm ERR! missing: tar@^1.0.0, required by [email protected] npm ERR! missing: punycode@>=0.2.0, required by [email protected]
  10. grunt serve

Application runs on port 9000

avalonabecker avatar Sep 24 '14 16:09 avalonabecker

Here's the package.json that finally worked:

{
  "name": "myproj",
  "version": "0.0.0",
  "dependencies": {},
  "devDependencies": {
    "grunt": "^0.4.1",
    "grunt-autoprefixer": "^0.7.3",
    "grunt-concurrent": "^0.5.0",
    "grunt-contrib-clean": "^0.5.0",
    "grunt-contrib-compass": "^0.7.2",
    "grunt-contrib-concat": "^0.4.0",
    "grunt-contrib-connect": "^0.7.1",
    "grunt-contrib-copy": "^0.5.0",
    "grunt-contrib-cssmin": "^0.9.0",
    "grunt-contrib-htmlmin": "^0.3.0",
    "grunt-contrib-imagemin": "^0.8.1",
    "grunt-contrib-jshint": "^0.10.0",
    "grunt-contrib-uglify": "^0.4.0",
    "grunt-contrib-watch": "^0.6.1",
    "grunt-filerev": "^0.2.1",
    "grunt-google-cdn": "^0.4.0",
    "grunt-newer": "^0.7.0",
    "grunt-ng-annotate": "^0.3.0",
    "grunt-svgmin": "^0.4.0",
    "grunt-usemin": "^2.1.1",
    "grunt-wiredep": "^1.7.0",
    "jshint-stylish": "^0.2.0",
    "load-grunt-tasks": "^0.4.0",
    "time-grunt": "^0.3.1",
    "coffee-script": "\*",
    "underscore.string": "\*",
    "esprima": "1.0.2",
    "lodash": "2.4.1",
    "seek-bzip": "^1.0.3",
    "tar": "1.0.0",
    "punycode": "0.2.0"
  },
  "engines": {
    "node": ">=0.10.0"
  },
  "scripts": {
    "test": "grunt test"
  }
}

avalonabecker avatar Sep 24 '14 16:09 avalonabecker

That has different things in then are generated by the project. Also I think duplicate of https://github.com/yeoman/generator-angular/issues/858

eddiemonge avatar Sep 24 '14 17:09 eddiemonge

Eddie,

Respectfully - I spent about $100 worth of my time to report this message to help your organization and others who are working in angular. I'd like a little more information if you'd be willing.

That has different things

What different things are you referring to?

I think duplicate

Are you sure, or guessing?

I also see in #858: Its probably because npm 2 isnt supported yet. It hasn't been fully tested. I should update the package.json file to require npm ~ 1.2.x

I should update the package.json

Are you going to update that, or no?

Thanks - not trying to be prickly, just trying to help resolve.

avalonabecker avatar Sep 24 '14 17:09 avalonabecker

@avalonabecker Excuse the brevity, but we get hundreds of npm install problem reports a week.

From the log:

10908 error If you need help, you may report this error at: 10908 error http://github.com/npm/npm/issues

This has nothing to do with this project specifically, rather npm which is used for installing dependencies.

sindresorhus avatar Sep 24 '14 19:09 sindresorhus