Npm install создает огромный список ошибок

Я должен сформулировать этот вопрос, сказав, что я действительно новичок в Angular и Node. Следуя указаниям этого урока Tuts +, я клонировал образец Angular repo, а затем запустил npm install. Это дало массивный список ошибок, а затем оставило мой терминал висящим около 5 минут. После этого я запустил npm start и открыл пример приложения, который, казалось, функционировал нормально.

Как я уже сказал, я очень новичок в Angular и Node, поэтому я не знаю, как отлаживать ошибки, которые я вижу, или если это даже то, о чем я должен беспокоиться. Любое понимание было бы очень полезно. Спасибо!

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 [email protected]~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 [email protected]~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 [email protected]~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 [email protected]~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 [email protected]~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 [email protected]~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 [email protected]~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 [email protected]~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 [email protected]~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]6.0-1
├── [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])

Ответы

Ответ 1

Карма 0.10 несовместима с node 0.12

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

Переключитесь на версию node 0.10, и установка, вероятно, сработает.

Ответ 2

Если я правильно понял ваш вопрос, причина, по которой вы получили ошибки, заключается в том, что ваша версия Node.js не соответствует Angular.js

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

существует два способа исправить вашу проблему.

  • Снизьте версию Node.js до версии Angular.js
  • Установите nvm, чтобы переключить версию Node.js

но я предлагаю вам попробовать последний, поскольку это простой способ управлять версией Node.js с помощью nvm.

Ответ 3

требуется: {"node":"~0.8 || ~0.10"} ( текущий: {"node":"0.12.2", "npm": "2.7.5" })

В соответствии с сообщением вам нужно понизить пакет node, так как пакет несовместим с новейшим node. Этого можно добиться с помощью следующих команд:

npm install -g n
n 0.10.44
node --version

n пакет интерактивно управляет всеми вашими версиями node.

Чтобы вернуться к последнему, запустите: n latest.