Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/node.js/40.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Node.js 使用纱线进行天然反应,或NPM未发现@expo/bunyan。我该怎么办?_Node.js_Reactjs_React Native_Npm_Yarnpkg - Fatal编程技术网

Node.js 使用纱线进行天然反应,或NPM未发现@expo/bunyan。我该怎么办?

Node.js 使用纱线进行天然反应,或NPM未发现@expo/bunyan。我该怎么办?,node.js,reactjs,react-native,npm,yarnpkg,Node.js,Reactjs,React Native,Npm,Yarnpkg,我尝试使用React Native创建应用程序,当我使用命令create React Native app时,找不到library@expo/bunyan。 我试图清理npm缓存,更改npm注册表,但仍然存在错误。 那是日志 Arguments: /usr/local/bin/node /usr/local/Cellar/yarn/1.5.1_1/libexec/bin/yarn.js add --dev --exact --ignore-optio$ PATH: /usr/local

我尝试使用React Native创建应用程序,当我使用命令create React Native app时,找不到library@expo/bunyan。 我试图清理npm缓存,更改npm注册表,但仍然存在错误。 那是日志

Arguments:
  /usr/local/bin/node /usr/local/Cellar/yarn/1.5.1_1/libexec/bin/yarn.js add --dev --exact --ignore-optio$

PATH:
  /usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/go/bin:/Library/Frameworks/Mono.framework/Versi$

Yarn version:
  1.5.1

Node version:
  8.10.0

Platform:
  darwin x64

npm manifest:
  {
    "name": "Tes",
    "version": "0.1.0",
    "private": true
  }

yarn manifest:
  No manifest

Lockfile:
  No lockfile

Trace:
  Error: Couldn't find package "@expo/bunyan@1.8.10" required by "react-native-scripts" on the "npm" regi$
      at new MessageError (/usr/local/Cellar/yarn/1.5.1_1/libexec/lib/cli.js:186:110)
      at PackageRequest.<anonymous> (/usr/local/Cellar/yarn/1.5.1_1/libexec/lib/cli.js:36274:17)
      at Generator.throw (<anonymous>)
      at step (/usr/local/Cellar/yarn/1.5.1_1/libexec/lib/cli.js:98:30)
      at /usr/local/Cellar/yarn/1.5.1_1/libexec/lib/cli.js:111:13
      at <anonymous>
      at process._tickCallback (internal/process/next_tick.js:188:7)
create react本机应用程序当前不支持npm5,因为npm5有缺陷。您可以使用npm4或可用的最新npm稳定版本

我已尝试在具有以下配置的系统上安装create react本机应用程序库:

节点-v

v9.4.0

npm-v

5.6.0

在安装之前,请移除节点_模块并清除npm缓存

使用npm配置集注册表设置npm注册表http://registry.npmjs.org/ 指挥部

然后尝试使用npm-i-react-native-scripts-save-use-npm-verbose命令进行安装

如果要使用Thread安装相同的库,则可以使用Thread global add create react native app命令安装相同的库


希望这对你有帮助

谢谢你的回答,我尝试了你的解决方案。但我有同样的错误,找不到package\@expo/bunyan@1.8.10\\npm\registry上的\react native scripts\所需。能否提供npm config get registry命令的输出?请检查curl的结果http://registry.npmjs.org/ 命令请确保网络没有阻止您的请求呼叫。谢谢朋友,我解决了它重新安装npm并更改注册表