无法启动博览会项目

时间:2020-06-26 05:56:19

标签: node.js reactjs react-native expo node-modules

当我尝试使用expo start时,expo项目无法启动。

节点版本-v12.18.1 博览会版本-3.21.10

当我运行expo start时:

Error: react-native is not installed. Please run `npm install` or `yarn` in your project directory.
Couldn't start project. Please fix the errors and restart the project.
Error: Couldn't start project. Please fix the errors and restart the project.
    at startExpoServerAsync (C:\@expo\xdl@57.9.18\src\Project.ts:2070:11)
    at Object.startAsync (C:\@expo\xdl@57.9.18\src\Project.ts:2384:5)
    at action (C:\Users\Admin\AppData\Roaming\npm\node_modules\expo-cli\src\commands\start.ts:181:3)
    at C:\Users\Admin\AppData\Roaming\npm\node_modules\expo-cli\src\commands\start.ts:354:16
    at Command.<anonymous> (C:\Users\Admin\AppData\Roaming\npm\node_modules\expo-cli\src\exp.ts:80:7)

然后我运行了上述错误中提到的npm install,但随后出现此错误

    npm ERR! code ERR_OSSL_PEM_NO_START_LINE
    npm ERR! error:0909006C:PEM routines:get_name:no start line
    
    npm ERR! A complete log of this run can be found in:
    npm ERR!     C:\Users\Admin\AppData\Roaming\npm-cache\_logs\2020-06-26T05_41_06_628Z-debug.log

这是我的错误日志文件

1212 silly saveTree +-- react-navigation@4.3.9
1212 silly saveTree +-- react@16.9.0
1212 silly saveTree +-- redux@4.0.5
1212 silly saveTree `-- yarn@1.22.4
1213 verbose stack Error: error:0909006C:PEM routines:get_name:no start line
1213 verbose stack     at Object.createSecureContext (_tls_common.js:149:17)
1213 verbose stack     at Object.connect (_tls_wrap.js:1588:48)
1213 verbose stack     at HttpsAgent.createConnection (https.js:130:22)
1213 verbose stack     at HttpsAgent.createSocket (C:\Users\Admin\AppData\Roaming\npm\node_modules\npm\node_modules\agentkeepalive\lib\_http_agent.js:265:26)
1213 verbose stack     at HttpsAgent.createSocket (C:\Users\Admin\AppData\Roaming\npm\node_modules\npm\node_modules\agentkeepalive\lib\agent.js:77:11)
1213 verbose stack     at HttpsAgent.addRequest (C:\Users\Admin\AppData\Roaming\npm\node_modules\npm\node_modules\agentkeepalive\lib\_http_agent.js:239:10)
1213 verbose stack     at new ClientRequest (_http_client.js:296:16)
1213 verbose stack     at request (https.js:314:10)
1213 verbose stack     at C:\Users\Admin\AppData\Roaming\npm\node_modules\npm\node_modules\node-fetch-npm\src\index.js:54:17
1213 verbose stack     at new Promise (<anonymous>)
1213 verbose stack     at fetch (C:\Users\Admin\AppData\Roaming\npm\node_modules\npm\node_modules\node-fetch-npm\src\index.js:41:10)
1213 verbose stack     at C:\Users\Admin\AppData\Roaming\npm\node_modules\npm\node_modules\make-fetch-happen\index.js:332:14
1213 verbose stack     at C:\Users\Admin\AppData\Roaming\npm\node_modules\npm\node_modules\promise-retry\index.js:29:24
1214 verbose cwd D:\React\customer-app
1215 verbose Windows_NT 10.0.18362
1216 verbose argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\Admin\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js" "install"
1217 verbose node v12.18.0
1218 verbose npm  v6.14.5
1219 error code ERR_OSSL_PEM_NO_START_LINE
1220 error error:0909006C:PEM routines:get_name:no start line
1221 verbose exit [ 1, true ]

请帮助我如何解决此错误!

1 个答案:

答案 0 :(得分:1)

尝试先做

npm set registry http://registry.npmjs.org/

https://stackoverflow.com/a/57195189