简体   繁体   English

react-native项目创建提供了节点预gyp命中错误套接字挂起错误

[英]react-native project creation gives node-pre-gyp Hit error socket hang up error

I am trying to create a react-native project, however, it throws the error while installing node-pre-gyp module. 我正在尝试创建一个react-native项目,但是,在安装node-pre-gyp模块时会引发错误。

I am using Mac, I also tried installed the node-pre-gyp globally. 我正在使用Mac,我也尝试过在全球安装node-pre-gyp However, getting the same error. 但是,得到同样的错误。

➜  mobile react-native init Demo
This will walk you through creating a new React Native project in /Users/gaurang.shah/Documents/personal/code/mobile/Demo
Installing react-native...
Consider installing yarn to make this faster: https://yarnpkg.com

> fsevents@1.2.7 install /Users/gaurang.shah/Documents/personal/code/mobile/Demo/node_modules/fsevents
> node install

node-pre-gyp WARN Using needle for node-pre-gyp https download
node-pre-gyp WARN Pre-built binaries not installable for fsevents@1.2.7 and node@11.10.0 (node-v67 ABI, unknown) (falling back to source compile with node-gyp)
node-pre-gyp WARN Hit error socket hang up
  SOLINK_MODULE(target) Release/.node
  CXX(target) Release/obj.target/fse/fsevents.o
  SOLINK_MODULE(target) Release/fse.node
  COPY /Users/gaurang.shah/Documents/personal/code/mobile/Demo/node_modules/fsevents/lib/binding/Release/node-v67-darwin-x64/fse.node
  TOUCH Release/obj.target/action_after_build.stamp
npm notice created a lockfile as package-lock.json. You should commit this file.
npm WARN react-native@0.58.5 requires a peer of react@16.6.3 but none is installed. You must install peer dependencies yourself.

+ react-native@0.58.5
added 733 packages from 381 contributors and audited 27744 packages in 899.043s
found 11 low severity vulnerabilities
  run `npm audit fix` to fix them, or `npm audit` for details

This might be due to incompatibility of old installed packages within node_modules with the newer version of npm. 这可能是由于node_modules中旧安装的软件包与较新版本的npm不兼容。 Try removing the node_modules directory using rm -rf Demo/node_modules , and retry mobile react-native init Demo . 尝试使用rm -rf Demo/node_modules删除node_modules目录,然后重试mobile react-native init Demo

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM