Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error on running a clean react-native project

Tags:

react-native

Metro Bundler ready.

Loading dependency graph, done.

error: bundling failed: Error: invalid value for dynamic deps behavior: null

at getDynamicDepsBehavior (C:\Projects\react-native\test\node_modules\metro\src\JSTransformer\worker\index.js:185:13)
at postTransform (C:\Projects\react-native\test\node_modules\metro\src\JSTransformer\worker\index.js:131:26)
at Object.transformCode [as transform] (C:\Projects\react-native\test\node_modules\metro\src\JSTransformer\worker\index.js:251:17)
at execMethod (C:\Projects\react-native\test\node_modules\jest-worker\build\child.js:92:29)
at process.on (C:\Projects\react-native\test\node_modules\jest-worker\build\child.js:42:7)
at process.emit (events.js:160:13)
at emit (internal/child_process.js:790:12)

BUNDLE [android, dev] ./index.js ░░░░░░░░░░░░░░░░ 0.0% (0/1), failed.

like image 940
Albertus Avatar asked Jan 19 '18 18:01

Albertus


People also ask

What does NPX react native Clean project do?

Cleans your React Native project by purging caches and modules, and reinstalling them again.

How do you clean Gradlew in react native?

How do I clear gradle cache in react native? To clear your gradle cache in android studio: open terminal and. run gradlew clean.

How do I clean my Android build?

Clean and Re-buildSelect “Build” from the menu at the top in Android Studio. Click on “Clean Project” and wait. Click on “Rebuild Project” and wait.


1 Answers

Sounds like a bad version of metro was published: https://github.com/facebook/metro/issues/126

Tried a fresh install and things are working now. Just running "npm install metro" to update to the hotfixed version (0.24.6) should also do the trick.

like image 59
Cailen Avatar answered Oct 20 '22 00:10

Cailen