Npm安装不工作。在PC和Mac上出现相同的错误 [英] Npm install not working. Same error on Pc and Mac

查看:6560
本文介绍了Npm安装不工作。在PC和Mac上出现相同的错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



  Davids-MBP:我想要创建一个PhoneGap应用程序, rentfinds davidthurman $ sudo npm start 

> rentfinds@1.0.0 prestart / Users / davidthurman / Desktop / Projects / rentfinds
> npm install


> fsevents@0.2.1 install / Users / davidthurman / Desktop / Projects / rentfinds / node_modules / fsevents
> node-gyp rebuild

CXX(target)Release / obj.target / fse / fsevents.o
在从../fsevents.cc:6中包含的文件中:
.. /../nan/nan.h:339:13:错误:在'v8 :: String'中没有名为'New'的成员
return _NAN_ERROR(v8 :: Exception :: Error,errmsg);
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.. /../nan/nan.h:319:50:注意:从宏'_NAN_ERROR'扩展
#define _NAN_ERROR(fun,errmsg)fun(v8 :: String :: New(errmsg))
~~~~~~ $
../../nan/nan.h:343:5:错误:在命名空间'v8'中没有名为'ThrowException'的成员
_NAN_THROW_ERROR(v8 :: Exception :: Error,errmsg);
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../nan/nan.h:324:11:note:从宏'_NAN_THROW_ERROR'扩展
v8 :: ThrowException(_NAN_ERROR(fun,errmsg)); \
~~~~ ^
../../nan/nan.h:343:5:错误:在'v8 :: String'中没有名为'New'的成员
_NAN_THROW_ERROR(v8 :: Exception :: Error,errmsg);
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../nan/nan.h:324:26:注意:从宏'_NAN_THROW_ERROR'扩展
v8 :: ThrowException(_NAN_ERROR(fun,errmsg)); \
^ ~~~~~~~~~~~~~~~~~
../../nan/nan.h:319:50:note :从宏'_NAN_ERROR'扩展
#define _NAN_ERROR(fun,errmsg)fun(v8 :: String :: New(errmsg))
~~~~~~ b $ b ../../nan/nan.h:348:9:错误:名称空间'v8'中没有名为'ThrowException'的类型
v8 :: ThrowException(error);
~~~~ ^
../../nan/nan.h:355:53:错误:在'v8 :: String'中没有名为'New'的成员你
是什么意思'v8 :: TypeSwitch :: New'?
v8 :: Local< v8 :: Value> err = v8 :: Exception :: Error(v8 :: String :: New(msg));
^ ~~~~~~~~~~~~~~~~
v8 :: TypeSwitch :: New
/Users/davidthurman/.node-gyp/5.0.0/include/ node / v8.h:4704:28:注意:
'v8 :: TypeSwitch :: New'这里声明
static Local< TypeSwitch> New(Local< FunctionTemplate> type);
^
在../fsevents.cc:6中包含的文件中:
../../nan/nan.h:355:69:error:调用类的私有构造函数
'v8 :: Local< v8 :: FunctionTemplate>'
v8 :: Local< v8 :: Value> err = v8 :: Exception :: Error(v8 :: String :: New(msg));
^
/Users/davidthurman/.node-gyp/5.0.0/include/node/v8.h:326:13:note:declared
private here
V8_INLINE Local (S * that)
^
在从../fsevents.cc:6中包含的文件中:
../../nan/nan.h:357:65:error:too函数调用的参数很少,期望2,
有1
obj-> Set(v8 :: String :: New(code),v8 :: Int32 :: New(errorNumber)
~~~~~~~~~~~~~~~~ ^
/Users/davidthurman/.node-gyp/5.0.0/include/node/v8.h:2496:3:note :'New'
在这里声明
static Local< Integer> New(Isolate * isolate,int32_t value);
^
在../fsevents.cc:6中包含的文件:
../../nan/nan.h:357:26:错误:没有成员命名为New in v8 :: String'
obj-> Set(v8 :: String :: New(code),v8 :: Int32 :: New(errorNumber));
~~~~~~~~~~~~~~ ^
../../nan/nan.h:369:12:错误:没有成员在'v8 :: String'
return _NAN_ERROR(v8 :: Exception :: TypeError,errmsg);
^ ~~~~~~~~~~~~~~~~~~~~~~~~~ $ b ../../nan/nan.h:319:50:注意:从宏'_NAN_ERROR'扩展
#define _NAN_ERROR(fun,errmsg)fun(v8 :: String :: New(errmsg) )
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ '
_NAN_THROW_ERROR(v8 :: Exception :: TypeError,errmsg);
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~
../../nan/nan.h:324:11:注意:从宏'_NAN_THROW_ERROR'扩展
v8 :: ThrowException(_NAN_ERROR(fun,errmsg)); \
~~~~ ^
../../nan/nan.h:373:5:错误:在'v8 :: String'中没有名为'New'的成员
_NAN_THROW_ERROR(v8 :: Exception :: TypeError,errmsg);
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~
../../nan/nan.h:324:26:注意:从宏'_NAN_THROW_ERROR'扩展
v8 :: ThrowException(_NAN_ERROR(fun,errmsg)); \
^ ~~~~~~~~~~~~~~~~~
../../nan/nan.h:319:50:note :从宏'_NAN_ERROR'扩展
#define _NAN_ERROR(fun,errmsg)fun(v8 :: String :: New(errmsg))
~~~~~~ b $ b ../../nan/nan.h:377:12:错误:在'v8 :: String'中没有名为'New'的成员
return _NAN_ERROR(v8 :: Exception :: RangeError,errmsg );
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ b $ b ../../nan/nan.h:319:50:注意:从宏'_NAN_ERROR'扩展
#define _NAN_ERROR(fun,errmsg)fun(v8 :: String :: New(errmsg ))
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ v8'
_NAN_THROW_ERROR(v8 :: Exception :: RangeError,errmsg);
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~
../../nan/nan.h:324:11:注意:从宏'_NAN_THROW_ERROR'扩展
v8 :: ThrowException(_NAN_ERROR(fun,errmsg)); \
~~~~ ^
../../nan/nan.h:381:5:错误:在v8 :: String中没有名为New的成员
_NAN_THROW_ERROR(v8 :: Exception :: RangeError,errmsg);
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~
../../nan/nan.h:324:26:注意:从宏'_NAN_THROW_ERROR'扩展
v8 :: ThrowException(_NAN_ERROR(fun,errmsg)); \
^ ~~~~~~~~~~~~~~~~~
../../nan/nan.h:319:50:note :从宏'_NAN_ERROR'扩展
#define _NAN_ERROR(fun,errmsg)fun(v8 :: String :: New(errmsg))
~~~~~~ b $ b ../../nan/nan.h:406:13:错误:命名空间'node'中没有名为'smalloc'的成员
,node :: smalloc :: FreeCallback callback
〜 ~~~~~ ^
../../nan/nan.h:141:71:注意:从宏'NAN_INLINE'扩展
#define NAN_INLINE(declarator)inline __attribute __((always_inline) )declarator
^
../../nan/nan.h:416:12:错误:没有匹配的函数调用'新'
return node :: Buffer :: New (数据,大小);
^ ~~~~~~~~~~~~~~~~~
/Users/davidthurman/.node-gyp/5.0.0/include/node/node_buffer.h:28:40 :注意:
候选函数不可行:没有从'char *'到
的已知转换v8 :: Isolate *'的第一个参数
NODE_EXTERN v8 :: MaybeLocal< v8 :: Object> New(v8 :: Isolate * isolate,size_t length);
^
/Users/davidthurman/.node-gyp/5.0.0/include/node/node_buffer.h:31:40:note:
候选函数不可行:没有已知的转换'char *'to
'v8 :: Isolate *'for 1st argument
NODE_EXTERN v8 :: MaybeLocal< v8 :: Object>新(v8 :: Isolate * isolate,
^
/Users/davidthurman/.node-gyp/5.0.0/include/node/node_buffer.h:43:40:note:
候选函数不可行:需要3个参数,但提供了2个
NODE_EXTERN v8 :: MaybeLocal< v8 :: Object> New(v8 :: Isolate * isolate,
^
/ Users / davidthurman /.node-gyp/5.0.0/include/node/node_buffer.h:36:40:note:
候选函数不可行:需要5个参数,但提供了2个参数
NODE_EXTERN v8 :: MaybeLocal< ; v8 :: Object> New(v8 :: Isolate * isolate,
^
在从../fsevents.cc:6中包含的文件中:
../../nan/nan .h:420:12:错误:没有匹配的函数调用'new'
return node :: Buffer :: New(size);
^ ~~~~~~~~~~~~~~ ~~~~~
/Users/davidthurman/.node-gyp/5.0.0/include/node/node_buffer.h:28:40:注意:
候选函数不可行:需要2个参数,但是提供了1个
NODE_EXTERN v8 :: MaybeLocal< v8 :: Object> New(v8 :: Isolate * isolate,size_t length);
^
/Users/davidthurman/.node-gyp/5.0.0/include/node/node_buffer.h:31:40:note:
候选函数不可行:需要至少2参数,但1是
提供
NODE_EXTERN v8 :: MaybeLocal< v8 :: Object>新(v8 :: Isolate * isolate,
^
/Users/davidthurman/.node-gyp/5.0.0/include/node/node_buffer.h:43:40:note:
候选函数不可行:需要3个参数,但提供了1个
NODE_EXTERN v8 :: MaybeLocal< v8 :: Object> New(v8 :: Isolate * isolate,
^
/ Users / davidthurman /.node-gyp/5.0.0/include/node/node_buffer.h:36:40:note:
候选函数不可行:需要5个参数,但提供了1个
NODE_EXTERN v8 :: MaybeLocal< ; v8 :: Object> New(v8 :: Isolate * isolate,
^
在从../fsevents.cc:6中包含的文件中:
../../nan/nan .h:427:26:错误:在命名空间'node :: Buffer'中没有名为'Use'的成员
return node :: Buffer :: Use(data,size);
~~~~~ ~~~~~~~~~ ^
../../nan/nan.h:727:49:错误:函数调用的参数太少,单个
参数'isolate'不是指定
v8 :: Local< v8 :: Object> obj = v8 :: Object :: New();
~~~~~~~~~~~~~~~~ ^
/Users/davidthurman/.node-gyp/5.0.0/include/node/v8.h:2930:3:注意:'New'
在这里声明
static Local< Object> New(Isolate * isolate);
^
致命错误:发出的错误太多,现在停止[-ferror-limit =]
生成20个错误。
make:*** [Release / obj.target / fse / fsevents.o]错误1
gyp ERR!构建错误
gyp ERR! stack错误:`make`失败,退出代码:2
gyp ERR! stack in ChildProcess.onExit(/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:270:23)
gyp ERR! stack at emitTwo(events.js:87:13)
gyp ERR! stack at ChildProcess.emit(events.js:172:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit(internal / child_process.js:200:12)
gyp ERR!系统达尔文14.5.0
gyp错误!命令/ usr / local / bin / node/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.jsrebuild
gyp ERR! cwd / Users / davidthurman / Desktop / Projects / rentfinds / node_modules / fsevents
gyp ERR! node -v v5.0.0
gyp ERR! node-gyp -v v3.0.3
gyp ERR!不确定
npm WARN install:fsevents fsevents@0.2.1 install:`node-gyp rebuild`
npm WARN install:fsevents退出状态1
npm WARN生命周期rentfinds@1.0.0~postinstall :无法在wd%s%s(wd =%s)中运行rentfinds@1.0.0 bower install / Users / davidthurman / Desktop / Projects / rentfinds

> rentfinds@1.0.0 start / Users / davidthurman / Desktop / Projects / rentfinds
> http-server -a localhost -p 8000 -c-1

sh:/Users/davidthurman/Desktop/Projects/rentfinds/node_modules/.bin/http-server:权限被拒绝

npm ERR!达尔文14.5.0
npm错误! argv/ usr / local / bin / node/ usr / local / bin / npmstart
npm ERR! node v5.0.0
npm ERR! npm v3.3.6
npm ERR!代码ELIFECYCLE
npm ERR! rentfinds@1.0.0 start:`http-server -a localhost -p 8000 -c-1`
npm ERR!退出状态126
npm ERR!
npm ERR!在rentfinds@1.0.0启动脚本http-server -a localhost -p 8000 -c-1失败。
npm ERR!这很可能是rentfinds包的一个问题,
npm ERR!不是用npm本身。
npm ERR!告诉作者这在您的系统上失败:
npm ERR! http-server -a localhost -p 8000 -c-1
npm ERR!您可以通过以下方式获取他们的信息:
npm ERR! npm owner ls rentfinds
npm ERR!上面可能有额外的日志输出。

npm ERR!请包含任何支持请求的以下文件:
npm ERR! /Users/davidthurman/Desktop/Projects/rentfinds/npm-debug.log
Davids-MBP:rentfinds davidthurman $

当我尝试运行类似Bower的时候,它说command not found
我试过没有sudo。我在Mac和Windows上得到了相同的错误。我看了看,似乎找不到任何东西。
任何想法?

解决方案

jest-cli期望一个较低版本的节点。升级jest-cli为我工作(我使用的节点版本4.0.0)

  npm install jest-cli  - dev 
npm install


Hello I am trying to create a Phonegap application and cannot seem to get my npm installers working.

    Davids-MBP:rentfinds davidthurman$ sudo npm start

> rentfinds@1.0.0 prestart /Users/davidthurman/Desktop/Projects/rentfinds
> npm install


> fsevents@0.2.1 install /Users/davidthurman/Desktop/Projects/rentfinds/node_modules/fsevents
> node-gyp rebuild

  CXX(target) Release/obj.target/fse/fsevents.o
In file included from ../fsevents.cc:6:
../../nan/nan.h:339:13: error: no member named 'New' in 'v8::String'
    return  _NAN_ERROR(v8::Exception::Error, errmsg);
            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../nan/nan.h:319:50: note: expanded from macro '_NAN_ERROR'
# define _NAN_ERROR(fun, errmsg) fun(v8::String::New(errmsg))
                                     ~~~~~~~~~~~~^
../../nan/nan.h:343:5: error: no member named 'ThrowException' in namespace 'v8'
    _NAN_THROW_ERROR(v8::Exception::Error, errmsg);
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../nan/nan.h:324:11: note: expanded from macro '_NAN_THROW_ERROR'
      v8::ThrowException(_NAN_ERROR(fun, errmsg));                             \
      ~~~~^
../../nan/nan.h:343:5: error: no member named 'New' in 'v8::String'
    _NAN_THROW_ERROR(v8::Exception::Error, errmsg);
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../nan/nan.h:324:26: note: expanded from macro '_NAN_THROW_ERROR'
      v8::ThrowException(_NAN_ERROR(fun, errmsg));                             \
                         ^~~~~~~~~~~~~~~~~~~~~~~
../../nan/nan.h:319:50: note: expanded from macro '_NAN_ERROR'
# define _NAN_ERROR(fun, errmsg) fun(v8::String::New(errmsg))
                                     ~~~~~~~~~~~~^
../../nan/nan.h:348:9: error: no type named 'ThrowException' in namespace 'v8'
    v8::ThrowException(error);
    ~~~~^
../../nan/nan.h:355:53: error: no member named 'New' in 'v8::String'; did you
      mean 'v8::TypeSwitch::New'?
    v8::Local<v8::Value> err = v8::Exception::Error(v8::String::New(msg));
                                                    ^~~~~~~~~~~~~~~
                                                    v8::TypeSwitch::New
/Users/davidthurman/.node-gyp/5.0.0/include/node/v8.h:4704:28: note: 
      'v8::TypeSwitch::New' declared here
  static Local<TypeSwitch> New(Local<FunctionTemplate> type);
                           ^
In file included from ../fsevents.cc:6:
../../nan/nan.h:355:69: error: calling a private constructor of class
      'v8::Local<v8::FunctionTemplate>'
    v8::Local<v8::Value> err = v8::Exception::Error(v8::String::New(msg));
                                                                    ^
/Users/davidthurman/.node-gyp/5.0.0/include/node/v8.h:326:13: note: declared
      private here
  V8_INLINE Local(S* that)
            ^
In file included from ../fsevents.cc:6:
../../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/davidthurman/.node-gyp/5.0.0/include/node/v8.h:2496:3: note: 'New'
      declared here
  static Local<Integer> New(Isolate* isolate, int32_t value);
  ^
In file included from ../fsevents.cc:6:
../../nan/nan.h:357:26: error: no member named 'New' in 'v8::String'
    obj->Set(v8::String::New("code"), v8::Int32::New(errorNumber));
             ~~~~~~~~~~~~^
../../nan/nan.h:369:12: error: no member named 'New' in 'v8::String'
    return _NAN_ERROR(v8::Exception::TypeError, errmsg);
           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../nan/nan.h:319:50: note: expanded from macro '_NAN_ERROR'
# define _NAN_ERROR(fun, errmsg) fun(v8::String::New(errmsg))
                                     ~~~~~~~~~~~~^
../../nan/nan.h:373:5: error: no member named 'ThrowException' in namespace 'v8'
    _NAN_THROW_ERROR(v8::Exception::TypeError, errmsg);
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../nan/nan.h:324:11: note: expanded from macro '_NAN_THROW_ERROR'
      v8::ThrowException(_NAN_ERROR(fun, errmsg));                             \
      ~~~~^
../../nan/nan.h:373:5: error: no member named 'New' in 'v8::String'
    _NAN_THROW_ERROR(v8::Exception::TypeError, errmsg);
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../nan/nan.h:324:26: note: expanded from macro '_NAN_THROW_ERROR'
      v8::ThrowException(_NAN_ERROR(fun, errmsg));                             \
                         ^~~~~~~~~~~~~~~~~~~~~~~
../../nan/nan.h:319:50: note: expanded from macro '_NAN_ERROR'
# define _NAN_ERROR(fun, errmsg) fun(v8::String::New(errmsg))
                                     ~~~~~~~~~~~~^
../../nan/nan.h:377:12: error: no member named 'New' in 'v8::String'
    return _NAN_ERROR(v8::Exception::RangeError, errmsg);
           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../nan/nan.h:319:50: note: expanded from macro '_NAN_ERROR'
# define _NAN_ERROR(fun, errmsg) fun(v8::String::New(errmsg))
                                     ~~~~~~~~~~~~^
../../nan/nan.h:381:5: error: no member named 'ThrowException' in namespace 'v8'
    _NAN_THROW_ERROR(v8::Exception::RangeError, errmsg);
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../nan/nan.h:324:11: note: expanded from macro '_NAN_THROW_ERROR'
      v8::ThrowException(_NAN_ERROR(fun, errmsg));                             \
      ~~~~^
../../nan/nan.h:381:5: error: no member named 'New' in 'v8::String'
    _NAN_THROW_ERROR(v8::Exception::RangeError, errmsg);
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../nan/nan.h:324:26: note: expanded from macro '_NAN_THROW_ERROR'
      v8::ThrowException(_NAN_ERROR(fun, errmsg));                             \
                         ^~~~~~~~~~~~~~~~~~~~~~~
../../nan/nan.h:319:50: note: expanded from macro '_NAN_ERROR'
# define _NAN_ERROR(fun, errmsg) fun(v8::String::New(errmsg))
                                     ~~~~~~~~~~~~^
../../nan/nan.h:406:13: error: no member named 'smalloc' in namespace 'node'
    , node::smalloc::FreeCallback callback
      ~~~~~~^
../../nan/nan.h:141:71: note: expanded from macro 'NAN_INLINE'
# define NAN_INLINE(declarator) inline __attribute__((always_inline)) declarator
                                                                      ^
../../nan/nan.h:416:12: error: no matching function for call to 'New'
    return node::Buffer::New(data, size);
           ^~~~~~~~~~~~~~~~~
/Users/davidthurman/.node-gyp/5.0.0/include/node/node_buffer.h:28:40: note: 
      candidate function not viable: no known conversion from 'char *' to
      'v8::Isolate *' for 1st argument
NODE_EXTERN v8::MaybeLocal<v8::Object> New(v8::Isolate* isolate, size_t length);
                                       ^
/Users/davidthurman/.node-gyp/5.0.0/include/node/node_buffer.h:31:40: note: 
      candidate function not viable: no known conversion from 'char *' to
      'v8::Isolate *' for 1st argument
NODE_EXTERN v8::MaybeLocal<v8::Object> New(v8::Isolate* isolate,
                                       ^
/Users/davidthurman/.node-gyp/5.0.0/include/node/node_buffer.h:43:40: note: 
      candidate function not viable: requires 3 arguments, but 2 were provided
NODE_EXTERN v8::MaybeLocal<v8::Object> New(v8::Isolate* isolate,
                                       ^
/Users/davidthurman/.node-gyp/5.0.0/include/node/node_buffer.h:36:40: note: 
      candidate function not viable: requires 5 arguments, but 2 were provided
NODE_EXTERN v8::MaybeLocal<v8::Object> New(v8::Isolate* isolate,
                                       ^
In file included from ../fsevents.cc:6:
../../nan/nan.h:420:12: error: no matching function for call to 'New'
    return node::Buffer::New(size);
           ^~~~~~~~~~~~~~~~~
/Users/davidthurman/.node-gyp/5.0.0/include/node/node_buffer.h:28:40: note: 
      candidate function not viable: requires 2 arguments, but 1 was provided
NODE_EXTERN v8::MaybeLocal<v8::Object> New(v8::Isolate* isolate, size_t length);
                                       ^
/Users/davidthurman/.node-gyp/5.0.0/include/node/node_buffer.h:31:40: note: 
      candidate function not viable: requires at least 2 arguments, but 1 was
      provided
NODE_EXTERN v8::MaybeLocal<v8::Object> New(v8::Isolate* isolate,
                                       ^
/Users/davidthurman/.node-gyp/5.0.0/include/node/node_buffer.h:43:40: note: 
      candidate function not viable: requires 3 arguments, but 1 was provided
NODE_EXTERN v8::MaybeLocal<v8::Object> New(v8::Isolate* isolate,
                                       ^
/Users/davidthurman/.node-gyp/5.0.0/include/node/node_buffer.h:36:40: note: 
      candidate function not viable: requires 5 arguments, but 1 was provided
NODE_EXTERN v8::MaybeLocal<v8::Object> New(v8::Isolate* isolate,
                                       ^
In file included from ../fsevents.cc:6:
../../nan/nan.h:427:26: error: no member named 'Use' in namespace 'node::Buffer'
    return node::Buffer::Use(data, size);
           ~~~~~~~~~~~~~~^
../../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/davidthurman/.node-gyp/5.0.0/include/node/v8.h:2930:3: note: 'New'
      declared here
  static Local<Object> New(Isolate* isolate);
  ^
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:270:23)
gyp ERR! stack     at emitTwo (events.js:87:13)
gyp ERR! stack     at ChildProcess.emit (events.js:172:7)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12)
gyp ERR! System Darwin 14.5.0
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/davidthurman/Desktop/Projects/rentfinds/node_modules/fsevents
gyp ERR! node -v v5.0.0
gyp ERR! node-gyp -v v3.0.3
gyp ERR! not ok 
npm WARN install:fsevents fsevents@0.2.1 install: `node-gyp rebuild`
npm WARN install:fsevents Exit status 1
npm WARN lifecycle rentfinds@1.0.0~postinstall: cannot run in wd %s %s (wd=%s) rentfinds@1.0.0 bower install /Users/davidthurman/Desktop/Projects/rentfinds

> rentfinds@1.0.0 start /Users/davidthurman/Desktop/Projects/rentfinds
> http-server -a localhost -p 8000 -c-1

sh: /Users/davidthurman/Desktop/Projects/rentfinds/node_modules/.bin/http-server: Permission denied

npm ERR! Darwin 14.5.0
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "start"
npm ERR! node v5.0.0
npm ERR! npm  v3.3.6
npm ERR! code ELIFECYCLE
npm ERR! rentfinds@1.0.0 start: `http-server -a localhost -p 8000 -c-1`
npm ERR! Exit status 126
npm ERR! 
npm ERR! Failed at the rentfinds@1.0.0 start script 'http-server -a localhost -p 8000 -c-1'.
npm ERR! This is most likely a problem with the rentfinds package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     http-server -a localhost -p 8000 -c-1
npm ERR! You can get their info via:
npm ERR!     npm owner ls rentfinds
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /Users/davidthurman/Desktop/Projects/rentfinds/npm-debug.log
Davids-MBP:rentfinds davidthurman$ 

Also whenever I try to run something like Bower it says "command not found" I've tried with and without sudo. Ive gotten the same error on a mac and windows. I've looked around and can't seem to find anything. Any ideas?

解决方案

jest-cli expected a lower version node. Upgrade jest-cli works for me (I am using node version 4.0.0)

npm install jest-cli --save-dev
npm install

这篇关于Npm安装不工作。在PC和Mac上出现相同的错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆