Reputation: 109
How to fix Metro Bundler process exited with code 1 Metro '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
Upvotes: 9
Views: 17645
Reputation: 1341
I had this problem in wsl2. it started to happen after installing a new extension. But just removing the extension did not do the job.
I had to delete the .vscode-server folder and then reload vscode
Upvotes: 0
Reputation: 497
Looks like it is a problem with the version (12.13.1) of node js. It works fine with older version 12.9.1.
I had a similar problem, so I uninstalled this version and installed the older version. This solved metro bundler problem.
Upvotes: 1
Reputation: 1
Had the same issue, and fixed it by decreasing my nodejs version from 12.13.1 to 12.9.1
Have the github thread for more details: https://github.com/expo/expo-cli/issues/1074
Upvotes: 0
Reputation: 147
I solved this problem by simply deleting the folder: C:\Users\bunty\AppData\Roaming\npm and delete the npm folder. and type the command npm install -g expo-cli in cmd(administrator). if still it didn't work try using lower version of node(12.9.0).
Upvotes: 0
Reputation: 708
If you are running on windows you can try the solutions provided in this thread on 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__\/.*/
];
change to:
var sharedBlacklist = [
/node_modules[\/\\]react[\/\\]dist[\/\\].*/,
/website\/node_modules\/.*/,
/heapCapture\/bundle\.js/,
/.*\/__tests__\/.*/
];
https://github.com/expo/expo-cli/issues/1074
Upvotes: 38