【发布时间】:2020-05-15 07:14:43
【问题描述】:
当我在 powershell 中运行npm start 时显示以下错误错误:
PS C:\Users\UTKARSH\Desktop\react_native\my_project> npm start @ start C:\Users\UTKARSH\Desktop\react_native\my_project expo start Starting project at C:\Users\UTKARSH\Desktop\react_native\my_project 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\UTKARSH\AppData\Roaming\npm\node_modules\expo-cli\node_modules\@expo\config\src\Project.ts:22:9) at ensureConfigHasDefaultValues (C:\Users\UTKARSH\AppData\Roaming\npm\node_modules\expo-cli\node_modules\@expo\config\src\Config.ts:419:22) at fillAndReturnConfig (C:\Users\UTKARSH\AppData\Roaming\npm\node_modules\expo-cli\node_modules\@expo\config\src\Config.ts:101:10) at getConfig (C:\Users\UTKARSH\AppData\Roaming\npm\node_modules\expo-cli\node_modules\@expo\config\src\Config.ts:137:10) at configureProjectAsync (C:\Users\UTKARSH\AppData\Roaming\npm\node_modules\expo-cli\src\commands\start.ts:288:25) at action (C:\Users\UTKARSH\AppData\Roaming\npm\node_modules\expo-cli\src\commands\start.ts:164:34) at C:\Users\UTKARSH\AppData\Roaming\npm\node_modules\expo-cli\src\commands\start.ts:341:16 at Command.<anonymous> (C:\Users\UTKARSH\AppData\Roaming\npm\node_modules\expo-cli\src\exp.ts:82:7) npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! @ start: `expo start` npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the @ start script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above. npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\UTKARSH\AppData\Roaming\npm-cache\_logs\2020-05-15T07_09_48_901Z-debug.log PS C:\Users\UTKARSH\Desktop\react_native\my_project> clear
我该如何解决这个问题?
【问题讨论】:
-
你安装了 expo-cli 吗?你甚至在使用世博会吗?还是只是反应原生?
标签: node.js react-native npm