Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
1.5k views
in Technique[技术] by (71.8m points)

react-native - 如何修复代码1退出的Metro Bundler进程(How to fix Metro Bundler process exited with code 1)

How to fix Metro Bundler process exited with code 1 Metro 'Bundler' process exited with code 1

(如何修复代码1退出的Metro Bundler进程如何代码1退出的Metro Bundler进程)

Error: Metro  'Bundler' process exited with code 1
    at 'ChildProcess' .<anonymous> (C:@expoxdl@56.6.0'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:UsersPranavAppDataRoaming
pm-cache\_logs2019-11-08T04_33_07_234Z-debug.log
  ask by mobile gaming translate from so

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

If you are running on windows you can try the solutions provided in this thread on github.

(如果您在Windows上运行,则可以尝试在github上的该线程中提供的解决方案。)

Solution from github that seems to work:

(来自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:


ode_modulesmetro-configsrcdefaultslacklist.js

var sharedBlacklist = [
  /node_modules[/\]react[/\]dist[/\].*/,
  /website/node_modules/.*/,
  /heapCapture/bundle.js/,
  /.*/__tests__/.*/
];

change to:

(改成:)

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)


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...