npm安装错误节点

时间:2016-03-01 05:02:28

标签: node.js reactjs npm react-native

D:\react_space\Demo_1>npm install

> bufferutil@1.2.1 install D:\react_space\Demo_1\node_modules\bufferutil
> node-gyp rebuild


D:\react_space\Demo_1\node_modules\bufferutil>if not defined npm_config_node_gyp (node "C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild )  else (node "" rebuild )
gyp WARN install got an error, rolling back install
gyp ERR! configure error
gyp ERR! stack Error: read ECONNRESET
gyp ERR! stack     at exports._errnoException (util.js:856:11)
gyp ERR! stack     at TLSWrap.onread (net.js:546:26)
gyp ERR! System Windows_NT 10.0.10240
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd D:\react_space\Demo_1\node_modules\bufferutil
gyp ERR! node -v v5.6.0
gyp ERR! node-gyp -v v3.2.1
gyp ERR! not ok
npm WARN install:bufferutil@1.2.1 bufferutil@1.2.1 install: `node-gyp rebuild`
npm WARN install:bufferutil@1.2.1 Exit status 1

> utf-8-validate@1.2.1 install D:\react_space\Demo_1\node_modules\utf-8-validate
> node-gyp rebuild


D:\react_space\Demo_1\node_modules\utf-8-validate>if not defined npm_config_node_gyp (node "C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild )  else (node "" rebuild )
gyp WARN install got an error, rolling back install
gyp ERR! configure error
gyp ERR! stack Error: connect ETIMEDOUT 104.20.22.46:443
gyp ERR! stack     at Object.exports._errnoException (util.js:856:11)
gyp ERR! stack     at exports._exceptionWithHostPort (util.js:879:20)
gyp ERR! stack     at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1053:14)
gyp ERR! System Windows_NT 10.0.10240
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd D:\react_space\Demo_1\node_modules\utf-8-validate
gyp ERR! node -v v5.6.0
gyp ERR! node-gyp -v v3.2.1
gyp ERR! not ok
npm WARN install:utf-8-validate@1.2.1 utf-8-validate@1.2.1 install: `node-gyp rebuild`
npm WARN install:utf-8-validate@1.2.1 Exit status 1
npm WARN optional Skipping failed optional dependency /chokidar/fsevents:
npm WARN notsup Not compatible with your operating system or architecture: fsevents@1.0.8

开发环境

win10 64
node 5.6.0
npm 3.6.0

当我执行npm install命令错误消息时...已经安装了package.json ss的依赖项。

执行npm install的时候出现的错误,然后package.json里面配置的第三方依赖也已经安装到node_modules文件夹中

有人和我有同样的问题吗?!

1 个答案:

答案 0 :(得分:0)

如果您的目录中没有package.json文件,请执行npm init

您需要指定要安装的软件包。 npm install <package-name>