【发布时间】:2021-02-05 17:36:14
【问题描述】:
我使用expo build:android 来创建应用程序
Error: Can't find react-native in package.json dependencies
Error: react-native is not installed. Please run `npm install` or `yarn` in your project directory.
There is an error with your project. See above logs for information.
Error: There is an error with your project. See above logs for information.
at C:\Users\softb\AppData\Roaming\npm\node_modules\expo-cli\src\exp.ts:665:15
at Command.<anonymous> (C:\Users\softb\AppData\Roaming\npm\node_modules\expo-cli\src\exp.ts:346:7)
顺便说一句,我从我的默认 cmd 安装了npm install react-native。但是当我尝试从项目目录安装时,我得到了这个错误。
I:\Codecanyon\singal res\code>npm install react-native
npm WARN ERESOLVE overriding peer dependency
npm WARN Found: react@16.13.1
npm WARN node_modules/react
npm WARN peer react@"16.13.1" from react-native@0.63.4
npm WARN node_modules/react-native
npm WARN react-native@"*" from the root project
npm WARN 1 more (@unimodules/react-native-adapter)
npm WARN 1 more (react-native-web)
npm WARN
npm WARN Could not resolve dependency:
npm WARN peer react@"17.0.1" from react-dom@17.0.1
npm WARN node_modules/react-dom
npm WARN peer react-dom@">=16.5.1" from react-native-web@0.13.18
npm WARN node_modules/react-native-web
npm ERR! code E404
npm ERR! 404 Not Found - GET https://registry.npmjs.org/@bit%2fstryber.matterhorn.loading-skeleton - Not found
npm ERR! 404
npm ERR! 404 '@bit/stryber.matterhorn.loading-skeleton@^0.0.1' is not in the npm registry.
npm ERR! 404 You should bug the author to publish it (or use the name yourself!)
npm ERR! 404
npm ERR! 404 Note that you can also install from a
npm ERR! 404 tarball, folder, http url, or git url.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\softb\AppData\Local\npm-cache\_logs\2021-02-05T08_10_48_624Z-debug.log
【问题讨论】:
-
查看 StackOverflow 答案,可能会对您有所帮助...stackoverflow.com/questions/43919115/…
标签: reactjs react-native