react-native: Error building project ("transforming index.android.js took longer than 301 seconds.")
Hello, everybody. Everything was absolutely fine, but now I can’t build my project anymore and every time I try I see the following error:
… [10:14:28 PM] <END> Building Dependency Graph (5403ms) [node-haste] Encountered an error while persisting cache: Error: TimeoutError: transforming /Users/alwxndr/Documents/Dev/_2016/rn-app/index.android.js took longer than 301 seconds. You can adjust timeout via the ‘transformTimeoutInterval’ option at /Users/alwxndr/Documents/Dev/_2016/rn-app/node_modules/react-native/packager/react-packager/src/JSTransformer/index.js:95:28 at tryCallOne (/Users/alwxndr/Documents/Dev/_2016/rn-app/node_modules/promise/lib/core.js:37:12) at /Users/alwxndr/Documents/Dev/_2016/rn-app/node_modules/promise/lib/core.js:123:15 at flush (/Users/alwxndr/Documents/Dev/_2016/rn-app/node_modules/asap/raw.js:50:29) at _combinedTickCallback (node.js:370:9) at process._tickCallback (node.js:401:11) /Users/alwxndr/Documents/Dev/_2016/rn-app/node_modules/promise/lib/done.js:10 throw err; ^
Error: TimeoutError: transforming /Users/alwxndr/Documents/Dev/_2016/rn-app/index.android.js took longer than 301 seconds. You can adjust timeout via the ‘transformTimeoutInterval’ option at /Users/alwxndr/Documents/Dev/_2016/rn-app/node_modules/react-native/packager/react-packager/src/JSTransformer/index.js:95:28 at tryCallOne (/Users/alwxndr/Documents/Dev/_2016/rn-app/node_modules/promise/lib/core.js:37:12) at /Users/alwxndr/Documents/Dev/_2016/rn-app/node_modules/promise/lib/core.js:123:15 at flush (/Users/alwxndr/Documents/Dev/_2016/rn-app/node_modules/asap/raw.js:50:29) at _combinedTickCallback (node.js:370:9) at process._tickCallback (node.js:401:11)```
More importantly, even if I do git checkout <sha of some old commit>
in my project, I can’t make it buildable. Maybe it is some cache error or something like that, but, of course, I am not sure. Brief googling didn’t help.
react-native bundle --platform ios --dev false --entry-file index.ios.js --bundle-output main.jsbundle --assets-dest ./ios
doesn’t work too.
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Reactions: 1
- Comments: 23 (9 by maintainers)
Commits related to this issue
- Lock transform-es2015-block-scoping at 6.15.0 see https://github.com/facebook/react-native/issues/8475#issuecomment-257137600 — committed to dmistomin/project-illithid by glittershark 7 years ago
It seems to be coming from the last version of babel/babylon. Downgrading it to
6.8.1
instead of6.8.2
fixes the issue for me.This error can appear again because of
babel-plugin-transform-es2015-block-scoping@6.18.0
. You can fix this by downgrading it tobabel-plugin-transform-es2015-block-scoping@6.15.0
https://github.com/babel/babel/issues/4795
@ColCh just go to node_modules/react-native and do
npm i babylon@6.8.1
thereYeah, I noticed that version bumb.
Checked on old build which failed with
babylon@6.8.1
now builds succesfully… Nice! 👍RN depends on
"babylon": "^6.8.2",
( https://github.com/facebook/react-native/commit/8b803c6143732915a6a390a2e1495e9355372aef ), and according to semver,6.8.3
will be installed, if you runnpm install react-native