如何修复 Metro Bundler 进程退出并显示代码 1
Metro“Bundler”进程退出,代码为 1
Error: Metro 'Bundler' process exited with code 1
at 'ChildProcess' .<anonymous> (C:\@expo\[email protected] /cdn-cgi/l/email-protection\'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 上此线程中提供的解决方案。
来自 github 的解决方案似乎有效:
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 https://github.com/expo/expo-cli/issues/1074
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)