[英]React native with Yarn or NPM is not finding @expo/bunyan. What I have to do?
I tried to create an application with React Native, when I use the command create-react-native-app the library @expo/bunyan is not found. 我尝试使用React Native创建一个应用程序,当我使用命令create-react-native-app时,找不到库@ expo / bunyan。 I tried to clean the npm cache, changing the npm registry, but I still have the error. 我试图清理npm缓存,更改了npm注册表,但是仍然出现错误。 That is the log. 那是日志。
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)
The create-react-native-app
does not support npm5
currently because npm5
is buggy. 由于npm5
有问题,因此create-react-native-app
目前不支持npm5
。 you can use npm4
or latest npm
stable version available. 您可以使用npm4
或最新的npm
稳定版本。
I have tried to install create-react-native-app
library on my system having the following configuration: 我尝试在具有以下配置的系统上安装create-react-native-app
库:
node -v 节点-v
v9.4.0 v9.4.0
npm -v npm -v
5.6.0 5.6.0
Before installation once remove the node_modules
and clear the npm-cache
. 在安装之前,请先删除node_modules
并清除npm-cache
。
Set npm registry using npm config set registry http://registry.npmjs.org/
command. 使用npm config set registry http://registry.npmjs.org/
命令设置npm注册表。
Then try to install using npm i react-native-scripts --save --use-npm --verbose
command. 然后尝试使用npm i react-native-scripts --save --use-npm --verbose
命令进行安装。
If you want to install the same library using yarn then you can use yarn global add create-react-native-app
command for the same. 如果要使用yarn安装相同的库,则可以使用yarn global add create-react-native-app
命令。
Hope this will help you! 希望这个能对您有所帮助!
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.