node.js - npm安装错误 Node

标签 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文件夹中

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

最佳答案

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

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

关于node.js - npm安装错误 Node ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35715020/

相关文章:

javascript - 如何在express js中的中间件之后渲染不在公共(public)或查看文件夹中的静态文件

javascript - Express.js 处理不匹配的路由

node.js - 在一个 node.js 实例中运行多个 socket.io-clients

javascript - 在将值设置为 state 之前对 Firebase 快照进行排序

javascript - 在我的倒计时时钟上获取 NaN 而不是数字?

javascript - Passport OAuth 持有者或 isAuthenticated

javascript - 切换一个列表项而不是整个列表

npm - npm脚本:读取.env文件

javascript - Bundle.js 文件中的 Babel 输出未正确输出

javascript - 航点 npm - 错误 : Can't resolve 'waypoint