无法使用npm start反应本地项目

时间:2020-05-17 00:48:00

标签: node.js react-native npm-start expo-cli

首先,我先安装npm(版本),然后安装expo cli(版本),然后按常规方式初始化一个项目,然后当我使用npm start启动我的项目时,也通过expo start获得此消息:

Cannot determine which native SDK version your project uses because the module `expo` is not installed. Please install it with `yarn add expo` and try again.
ConfigError: Cannot determine which native SDK version your project uses because the module `expo` is not installed. Please install it with `yarn add expo` and try again.
at Object.getExpoSDKVersion (C:\Users\BILAL\AppData\Roaming\npm\node_modules\expo-cli\node_modules\@expo\config\src\Project.ts:22:9)
at ensureConfigHasDefaultValues (C:\Users\BILAL\AppData\Roaming\npm\node_modules\expo-cli\node_modules\@expo\config\src\Config.ts:419:22)
at fillAndReturnConfig (C:\Users\BILAL\AppData\Roaming\npm\node_modules\expo-cli\node_modules\@expo\config\src\Config.ts:101:10)
at getConfig (C:\Users\BILAL\AppData\Roaming\npm\node_modules\expo-cli\node_modules\@expo\config\src\Config.ts:137:10)
at configureProjectAsync (C:\Users\BILAL\AppData\Roaming\npm\node_modules\expo-cli\src\commands\start.ts:288:25)
at action (C:\Users\BILAL\AppData\Roaming\npm\node_modules\expo-cli\src\commands\start.ts:164:34)
at C:\Users\BILAL\AppData\Roaming\npm\node_modules\expo-cli\src\commands\start.ts:341:16
at Command.<anonymous> (C:\Users\BILAL\AppData\Roaming\npm\node_modules\expo-cli\src\exp.ts:82:7)
npm ERR! code ELIFECYCLE

npm ERR! errno 1 npm ERR! @开始:expo start npm ERR!退出状态1 npm ERR! npm ERR! @启动脚本失败。 npm ERR! npm可能不是问题。上面可能还有其他日志记录输出。

npm ERR!可以在以下位置找到此运行的完整日志: npm ERR! C:\ Users \ BILAL \ AppData \ Roaming \ npm-cache_logs \ 2020-05-17T00_34_22_028Z-debug.log

我之前也使用过react native和react-cli来开发一个简单的应用程序,并且它可以正常工作,但是这次我尝试了一个星期却没有结果

非常感谢

0 个答案:

没有答案