本文介绍了如何修复代码1退出的Metro Bundler进程的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何修复已退出代码1的Metro Bundler进程Metro"Bundler"进程已退出,代码为1
How to fix Metro Bundler process exited with code 1Metro 'Bundler' process exited with code 1
Error: Metro 'Bundler' process exited with code 1
at 'ChildProcess' .<anonymous> (C:\@expo\[email protected]\'src'\Project.ts:1841:16)
at Object.onceWrapper (events.js:300:26)
at ChildProcess.emit (events.js:210:5)
at Process.ChildProcess._ handle.onexit (internal/child_
process.js:272:12)
ERR! code ELIFECYCLE
ERR! err no 1
ERR! @ start: `expo start`
ERR! Exit status 1
ERR!
ERR! Failed at the @ start script.
ERR! This is probably not a problem with npm. There is likely additional logging output above.
ERR! A complete log of this run can be found in:
ERR! C:\Users\Pranav\AppData\Roaming\npm-cache\_logs\2019-11-08T04_33_07_234Z-debug.log
推荐答案
如果您在Windows上运行,则可以在github上尝试此线程中提供的解决方案.
If you are running on windows you can try the solutions provided in this thread on github.
来自github的解决方案似乎有效:
Solution from github that seems to work:
Got this issue today on windows, but don't need to downgrade node, just as discussed on stackoverflow just need to change some hashes on your project:
\node_modules\metro-config\src\defaults\blacklist.js
var sharedBlacklist = [
/node_modules[/\\]react[/\\]dist[/\\].*/,
/website\/node_modules\/.*/,
/heapCapture\/bundle\.js/,
/.*\/__tests__\/.*/
];
更改为:
var sharedBlacklist = [
/node_modules[\/\\]react[\/\\]dist[\/\\].*/,
/website\/node_modules\/.*/,
/heapCapture\/bundle\.js/,
/.*\/__tests__\/.*/
];
https://github.com/expo/expo-cli/issues/1074
这篇关于如何修复代码1退出的Metro Bundler进程的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!