Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

npm install generates huge list of errors

I must preface this question by saying that I am really new to Angular and Node. Following the directions from this Tuts+ tutorial, I cloned a sample Angular repo and then ran npm install. That yielded a massive list of errors, and then left my Terminal hanging for about 5 minutes. After that, I ran npm start and opened the sample app, which seemed to function just fine.

As I said, I'm very new to Angular and Node, so I don't know how to debug the errors I'm seeing, or if it's even something I should worry about. Any insight would be very helpful. Thanks!

npm install log: https://gist.github.com/danielbonnell/30959bd15297f1f4ab43

➜  angular-seed git:(master) npm install
npm WARN engine [email protected]: wanted: {"node":"~0.8 || ~0.10"} (current: {"node":"0.12.2","npm":"2.7.5"})
npm WARN peerDependencies The peer dependency karma-jasmine@~0.1.0 included from karma will no
npm WARN peerDependencies longer be automatically installed to fulfill the peerDependency
npm WARN peerDependencies in npm 3+. Your application will need to depend on it explicitly.
npm WARN peerDependencies The peer dependency karma-requirejs@~0.2.0 included from karma will no
npm WARN peerDependencies longer be automatically installed to fulfill the peerDependency
npm WARN peerDependencies in npm 3+. Your application will need to depend on it explicitly.
npm WARN peerDependencies The peer dependency karma-coffee-preprocessor@~0.1.0 included from karma will no
npm WARN peerDependencies longer be automatically installed to fulfill the peerDependency
npm WARN peerDependencies in npm 3+. Your application will need to depend on it explicitly.
npm WARN peerDependencies The peer dependency karma-html2js-preprocessor@~0.1.0 included from karma will no
npm WARN peerDependencies longer be automatically installed to fulfill the peerDependency
npm WARN peerDependencies in npm 3+. Your application will need to depend on it explicitly.
npm WARN peerDependencies The peer dependency karma-chrome-launcher@~0.1.0 included from karma will no
npm WARN peerDependencies longer be automatically installed to fulfill the peerDependency
npm WARN peerDependencies in npm 3+. Your application will need to depend on it explicitly.
npm WARN peerDependencies The peer dependency karma-firefox-launcher@~0.1.0 included from karma will no
npm WARN peerDependencies longer be automatically installed to fulfill the peerDependency
npm WARN peerDependencies in npm 3+. Your application will need to depend on it explicitly.
npm WARN peerDependencies The peer dependency karma-phantomjs-launcher@~0.1.0 included from karma will no
npm WARN peerDependencies longer be automatically installed to fulfill the peerDependency
npm WARN peerDependencies in npm 3+. Your application will need to depend on it explicitly.
npm WARN peerDependencies The peer dependency karma-script-launcher@~0.1.0 included from karma will no
npm WARN peerDependencies longer be automatically installed to fulfill the peerDependency
npm WARN peerDependencies in npm 3+. Your application will need to depend on it explicitly.

> [email protected] install /Users/ACIDSTEALTH/Dropbox/Launch_Academy/angular-seed/node_modules/karma/node_modules/chokidar/node_modules/fsevents
> node-gyp rebuild

  CXX(target) Release/obj.target/fse/fsevents.o
In file included from ../fsevents.cc:6:
../node_modules/nan/nan.h:339:13: error: no member named 'New' in 'v8::String'
    return  _NAN_ERROR(v8::Exception::Error, errmsg);
            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../node_modules/nan/nan.h:319:50: note: expanded from macro '_NAN_ERROR'
# define _NAN_ERROR(fun, errmsg) fun(v8::String::New(errmsg))
                                     ~~~~~~~~~~~~^
../node_modules/nan/nan.h:343:5: error: no member named 'ThrowException' in namespace 'v8'
    _NAN_THROW_ERROR(v8::Exception::Error, errmsg);
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../node_modules/nan/nan.h:324:11: note: expanded from macro '_NAN_THROW_ERROR'
      v8::ThrowException(_NAN_ERROR(fun, errmsg));                             \
      ~~~~^
../node_modules/nan/nan.h:343:5: error: no member named 'New' in 'v8::String'
    _NAN_THROW_ERROR(v8::Exception::Error, errmsg);
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../node_modules/nan/nan.h:324:26: note: expanded from macro '_NAN_THROW_ERROR'
      v8::ThrowException(_NAN_ERROR(fun, errmsg));                             \
                         ^~~~~~~~~~~~~~~~~~~~~~~
macro '_NAN_ERROR'n/nan.h:319:50: note: expanded from -
# define _NAN_ERROR(fun, errmsg) fun(v8::String::New(errmsg))
                                     ~~~~~~~~~~~~^
../node_modules/nan/nan.h:348:9: error: no type named 'ThrowException' in namespace 'v8'
    v8::ThrowException(error);
    ~~~~^
../node_modules/nan/nan.h:355:65: error: no member named 'New' in 'v8::String'
    v8::Local<v8::Value> err = v8::Exception::Error(v8::String::New(msg));
                                                    ~~~~~~~~~~~~^
../node_modules/nan/nan.h:357:26: error: no member named 'New' in 'v8::String'
    obj->Set(v8::String::New("code"), v8::Int32::New(errorNumber));
             ~~~~~~~~~~~~^
../node_modules/nan/nan.h:357:65: error: too few arguments to function call, expected 2, have 1
    obj->Set(v8::String::New("code"), v8::Int32::New(errorNumber));
                                      ~~~~~~~~~~~~~~            ^
/Users/ACIDSTEALTH/.node-gyp/0.12.2/deps/v8/include/v8.h:2012:3: note: 'New' declared here
  static Local<Integer> New(Isolate* isolate, int32_t value);
  ^
In file included from ../fsevents.cc:6:
../node_modules/nan/nan.h:369:12: error: no member named 'New' in 'v8::String'
    return _NAN_ERROR(v8::Exception::TypeError, errmsg);
           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../node_modules/nan/nan.h:319:50: note: expanded from macro '_NAN_ERROR'
# define _NAN_ERROR(fun, errmsg) fun(v8::String::New(errmsg))
                                     ~~~~~~~~~~~~^
../node_modules/nan/nan.h:373:5: error: no member named 'ThrowException' in namespace 'v8'
    _NAN_THROW_ERROR(v8::Exception::TypeError, errmsg);
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../node_modules/nan/nan.h:324:11: note: expanded from macro '_NAN_THROW_ERROR'
      v8::ThrowException(_NAN_ERROR(fun, errmsg));                             \
      ~~~~^
../node_modules/nan/nan.h:373:5: error: no member named 'New' in 'v8::String'
    _NAN_THROW_ERROR(v8::Exception::TypeError, errmsg);
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../node_modules/nan/nan.h:324:26: note: expanded from macro '_NAN_THROW_ERROR'
      v8::ThrowException(_NAN_ERROR(fun, errmsg));                             \
                         ^~~~~~~~~~~~~~~~~~~~~~~
../node_modules/nan/nan.h:319:50: note: expanded from macro '_NAN_ERROR'
# define _NAN_ERROR(fun, errmsg) fun(v8::String::New(errmsg))
                                     ~~~~~~~~~~~~^
../node_modules/nan/nan.h:377:12: error: no member named 'New' in 'v8::String'
    return _NAN_ERROR(v8::Exception::RangeError, errmsg);
           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../node_modules/nan/nan.h:319:50: note: expanded from macro '_NAN_ERROR'
# define _NAN_ERROR(fun, errmsg) fun(v8::String::New(errmsg))
                                     ~~~~~~~~~~~~^
../node_modules/nan/nan.h:381:5: error: no member named 'ThrowException' in namespace 'v8'
    _NAN_THROW_ERROR(v8::Exception::RangeError, errmsg);
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../node_modules/nan/nan.h:324:11: note: expanded from macro '_NAN_THROW_ERROR'
      v8::ThrowException(_NAN_ERROR(fun, errmsg));                             \
      ~~~~^
../node_modules/nan/nan.h:381:5: error: no member named 'New' in 'v8::String'
    _NAN_THROW_ERROR(v8::Exception::RangeError, errmsg);
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../node_modules/nan/nan.h:324:26: note: expanded from macro '_NAN_THROW_ERROR'
      v8::ThrowException(_NAN_ERROR(fun, errmsg));                             \
                         ^~~~~~~~~~~~~~~~~~~~~~~
../node_modules/nan/nan.h:319:50: note: expanded from macro '_NAN_ERROR'
# define _NAN_ERROR(fun, errmsg) fun(v8::String::New(errmsg))
                                     ~~~~~~~~~~~~^
../node_modules/nan/nan.h:727:49: error: too few arguments to function call, single argument 'isolate' was not specified
    v8::Local<v8::Object> obj = v8::Object::New();
                                ~~~~~~~~~~~~~~~ ^
/Users/ACIDSTEALTH/.node-gyp/0.12.2/deps/v8/include/v8.h:2388:3: note: 'New' declared here
  static Local<Object> New(Isolate* isolate);
  ^
In file included from ../fsevents.cc:6:
../node_modules/nan/nan.h:733:49: error: too few arguments to function call, single argument 'isolate' was not specified
    v8::Local<v8::Object> obj = v8::Object::New();
                                ~~~~~~~~~~~~~~~ ^
/Users/ACIDSTEALTH/.node-gyp/0.12.2/deps/v8/include/v8.h:2388:3: note: 'New' declared here
  static Local<Object> New(Isolate* isolate);
  ^
In file included from ../fsevents.cc:6:
../node_modules/nan/nan.h:740:12: error: no member named 'Dispose' in 'v8::Persistent<v8::Object, v8::NonCopyablePersistentTraits<v8::Object> >'
    handle.Dispose();
    ~~~~~~ ^
../node_modules/nan/nan.h:741:12: error: no member named 'Clear' in 'v8::Persistent<v8::Object, v8::NonCopyablePersistentTraits<v8::Object> >'
    handle.Clear();
    ~~~~~~ ^
../node_modules/nan/nan.h:746:39: error: no member named 'NewSymbol' in 'v8::String'; did you mean 'IsSymbol'?
    NanPersistentToLocal(handle)->Set(NanSymbol("callback"), fn);
                                      ^~~~~~~~~~~~~~~~~~~~~
../node_modules/nan/nan.h:181:38: note: expanded from macro 'NanSymbol'
#define NanSymbol(value) v8::String::NewSymbol(value)
                         ~~~~~~~~~~~~^
/Users/ACIDSTEALTH/.node-gyp/0.12.2/deps/v8/include/v8.h:1379:8: note: 'IsSymbol' declared here
  bool IsSymbol() const;
       ^
In file included from ../fsevents.cc:6:
../node_modules/nan/nan.h:746:39: error: call to non-static member function without an object argument
    NanPersistentToLocal(handle)->Set(NanSymbol("callback"), fn);
                                      ^~~~~~~~~~~~~~~~~~~~~
../node_modules/nan/nan.h:181:38: note: expanded from macro 'NanSymbol'
#define NanSymbol(value) v8::String::NewSymbol(value)
                         ~~~~~~~~~~~~^~~~~~~~~
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
make: *** [Release/obj.target/fse/fsevents.o] Error 1
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:269:23)
gyp ERR! stack     at ChildProcess.emit (events.js:110:17)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (child_process.js:1074:12)
gyp ERR! System Darwin 14.3.0
gyp ERR! command "node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/ACIDSTEALTH/Dropbox/Launch_Academy/angular-seed/node_modules/karma/node_modules/chokidar/node_modules/fsevents
gyp ERR! node -v v0.12.2
gyp ERR! node-gyp -v v1.0.3
gyp ERR! not ok
npm WARN optional dep failed, continuing [email protected]

> [email protected] install /Users/ACIDSTEALTH/Dropbox/Launch_Academy/angular-seed/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws
> (node-gyp rebuild 2> builderror.log) || (exit 0)

  CXX(target) Release/obj.target/bufferutil/src/bufferutil.o
  SOLINK_MODULE(target) Release/bufferutil.node
  SOLINK_MODULE(target) Release/bufferutil.node: Finished
  CXX(target) Release/obj.target/validation/src/validation.o
  SOLINK_MODULE(target) Release/validation.node
  SOLINK_MODULE(target) Release/validation.node: Finished
npm WARN peerDependencies The peer dependency requirejs@~2.1 included from karma-requirejs will no
npm WARN peerDependencies longer be automatically installed to fulfill the peerDependency
npm WARN peerDependencies in npm 3+. Your application will need to depend on it explicitly.
\
> [email protected] install /Users/ACIDSTEALTH/Dropbox/Launch_Academy/angular-seed/node_modules/karma-phantomjs-launcher/node_modules/phantomjs
> node install.js

PhantomJS detected, but wrong version 2.0.0 @ /usr/local/bin/phantomjs.
Downloading https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-1.9.8-macosx.zip
Saving to /var/folders/bq/g95dzyzn6nv074fpfhz2tjkh0000gn/T/phantomjs/phantomjs-1.9.8-macosx.zip
Receiving...
  [========================----------------] 60% 0.0s
Received 9187K total.
Extracting zip contents
Removing /Users/ACIDSTEALTH/Dropbox/Launch_Academy/angular-seed/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom
Copying extracted folder /var/folders/bq/g95dzyzn6nv074fpfhz2tjkh0000gn/T/phantomjs/phantomjs-1.9.8-macosx.zip-extract-1429227494807/phantomjs-1.9.8-macosx -> /Users/ACIDSTEALTH/Dropbox/Launch_Academy/angular-seed/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom
Writing location.js file
Done. Phantomjs binary available at /Users/ACIDSTEALTH/Dropbox/Launch_Academy/angular-seed/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom/bin/phantomjs

> [email protected] postinstall /Users/ACIDSTEALTH/Dropbox/Launch_Academy/angular-seed
> bower install

bower html5-boilerplate#~4.3.0       not-cached git://github.com/h5bp/html5-boilerplate.git#~4.3.0
bower html5-boilerplate#~4.3.0          resolve git://github.com/h5bp/html5-boilerplate.git#~4.3.0
bower angular-route#1.2.x            not-cached git://github.com/angular/bower-angular-route.git#1.2.x
bower angular-route#1.2.x               resolve git://github.com/angular/bower-angular-route.git#1.2.x
bower angular-loader#1.2.x           not-cached git://github.com/angular/bower-angular-loader.git#1.2.x
bower angular-loader#1.2.x              resolve git://github.com/angular/bower-angular-loader.git#1.2.x
bower angular-mocks#~1.2.x           not-cached git://github.com/angular/bower-angular-mocks.git#~1.2.x
bower angular-mocks#~1.2.x              resolve git://github.com/angular/bower-angular-mocks.git#~1.2.x
bower angular#1.2.x                  not-cached git://github.com/angular/bower-angular.git#1.2.x
bower angular#1.2.x                     resolve git://github.com/angular/bower-angular.git#1.2.x
bower html5-boilerplate#~4.3.0         download https://github.com/h5bp/html5-boilerplate/archive/v4.3.0.tar.gz
bower angular-mocks#~1.2.x             download https://github.com/angular/bower-angular-mocks/archive/v1.2.28.tar.gz
bower angular#1.2.x                    download https://github.com/angular/bower-angular/archive/v1.2.28.tar.gz
bower angular-route#1.2.x              download https://github.com/angular/bower-angular-route/archive/v1.2.28.tar.gz
bower angular-loader#1.2.x             download https://github.com/angular/bower-angular-loader/archive/v1.2.28.tar.gz
bower html5-boilerplate#~4.3.0          extract archive.tar.gz
bower angular-mocks#~1.2.x              extract archive.tar.gz
bower angular-loader#1.2.x              extract archive.tar.gz
bower angular-route#1.2.x               extract archive.tar.gz
bower angular-mocks#~1.2.x             resolved git://github.com/angular/bower-angular-mocks.git#1.2.28
bower angular#1.2.x                     extract archive.tar.gz
bower angular-loader#1.2.x             resolved git://github.com/angular/bower-angular-loader.git#1.2.28
bower angular-route#1.2.x              resolved git://github.com/angular/bower-angular-route.git#1.2.28
bower angular#1.2.x                    resolved git://github.com/angular/bower-angular.git#1.2.28
bower html5-boilerplate#~4.3.0     invalid-meta html5-boilerplate is missing "main" entry in bower.json
bower html5-boilerplate#~4.3.0     invalid-meta html5-boilerplate is missing "ignore" entry in bower.json
bower html5-boilerplate#~4.3.0         resolved git://github.com/h5bp/html5-boilerplate.git#4.3.0
bower angular-mocks#~1.2.x              install angular-mocks#1.2.28
bower angular-loader#1.2.x              install angular-loader#1.2.28
bower angular-route#1.2.x               install angular-route#1.2.28
bower angular#1.2.x                     install angular#1.2.28
bower html5-boilerplate#~4.3.0          install html5-boilerplate#4.3.0

angular-mocks#1.2.28 app/bower_components/angular-mocks
└── angular#1.2.28

angular-loader#1.2.28 app/bower_components/angular-loader
└── angular#1.2.28

angular-route#1.2.28 app/bower_components/angular-route
└── angular#1.2.28

angular#1.2.28 app/bower_components/angular

html5-boilerplate#4.3.0 app/bower_components/html5-boilerplate
[email protected] node_modules/karma-junit-reporter
└── [email protected]

[email protected] node_modules/shelljs

[email protected] node_modules/http-server
├── [email protected]
├── [email protected]
├── [email protected] ([email protected])
├── [email protected] ([email protected])
├── [email protected] ([email protected], [email protected], [email protected])
└── [email protected] ([email protected], [email protected])

[email protected] node_modules/protractor
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected] ([email protected], [email protected])
├── [email protected] ([email protected])
├── [email protected] ([email protected], [email protected])
├── [email protected]
├── [email protected]
├── [email protected] ([email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected])
├── [email protected] ([email protected])
└── [email protected] ([email protected], [email protected])

[email protected] node_modules/bower
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected] ([email protected])
├── [email protected] ([email protected], [email protected], [email protected], [email protected])
├── [email protected] ([email protected], [email protected], [email protected], [email protected], [email protected])
├── [email protected] ([email protected], [email protected], [email protected])
├── [email protected]
├── [email protected] ([email protected])
├── [email protected] ([email protected])
├── [email protected] ([email protected])
├── [email protected] ([email protected])
├── [email protected] ([email protected], [email protected])
├── [email protected] ([email protected], [email protected])
├── [email protected] ([email protected], [email protected], [email protected], [email protected])
├── [email protected] ([email protected], [email protected], [email protected], [email protected], [email protected])
├── [email protected] ([email protected], [email protected], [email protected], [email protected])
├── [email protected] ([email protected], [email protected], [email protected], [email protected])
├── [email protected]
├── [email protected] ([email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected])
├── [email protected] ([email protected], [email protected])
├── [email protected] ([email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected])
├── [email protected] ([email protected], [email protected], [email protected], [email protected])
├── [email protected]
├── [email protected] ([email protected], [email protected])
├── [email protected] ([email protected], [email protected], [email protected], [email protected], [email protected])
└── [email protected] ([email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected])

[email protected] node_modules/karma-firefox-launcher

[email protected] node_modules/karma-script-launcher

[email protected] node_modules/karma-html2js-preprocessor

[email protected] node_modules/karma-jasmine

[email protected] node_modules/karma-chrome-launcher
└── [email protected]

[email protected] node_modules/requirejs

[email protected] node_modules/karma-requirejs

[email protected] node_modules/karma-coffee-preprocessor
└── [email protected] ([email protected])

[email protected] node_modules/karma-phantomjs-launcher
└── [email protected] ([email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected])

[email protected] node_modules/karma
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected] ([email protected])
├── [email protected] ([email protected], [email protected])
├── [email protected] ([email protected])
├── [email protected]
├── [email protected]
├── [email protected] ([email protected], [email protected], [email protected], [email protected])
├── [email protected] ([email protected], [email protected], [email protected], [email protected])
├── [email protected] ([email protected])
├── [email protected] ([email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected])
├── [email protected] ([email protected])
└── [email protected] ([email protected], [email protected], [email protected], [email protected])
like image 211
Daniel Bonnell Avatar asked Apr 16 '15 23:04

Daniel Bonnell


People also ask

How do I get rid of npm warnings?

you need to change that to npm --logevel=error install , and that will suppress the WARN message and Team Foundation Server will stop complaining about it. After waiting on angular 4 to install for an hour, I cancelled it, used this parameter, and it installed in about 10 seconds.

Why npm install is not working?

The Npm command not found error can appear when you install or upgrade npm. On Windows, the cause of this error could be that a PATH or system variable is not correctly set. The error can also occur if you do not have npm or Node. js installed, have an outdated version, or have permission issues.


2 Answers

Karma 0.10 incompatible with node 0.12

npm WARN engine [email protected]: wanted: {"node":"~0.8 || ~0.10"} (current: {"node":"0.12.2","npm":"2.7.5"})

Switch to a node 0.10 version and the install will probably work.

like image 81
Travis Webb Avatar answered Oct 15 '22 16:10

Travis Webb


If I understand your question correctly, the reason why got the errors is that your Node.js version does not match with Angular.js

[email protected]: wanted: {"node":"~0.8 || ~0.10"} (current: {"node":"0.12.2","npm":"2.7.5"})

there is two way to fix your problem

  1. Downgrade your Node.js version to match with Angular.js
  2. Install nvm to switch your Node.js version

but i suggest you try the latter as it is an easy way to manage Node.js version using the nvm.

like image 21
qianjiahao Avatar answered Oct 15 '22 18:10

qianjiahao