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]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.
I have same issues. Happened when i switched to react-native 0.28 from 0.26.3.
Downgrading doesn't help. I believe it is not a 0.28-specific issue.
I have tried to reclone the project and still hitting the same error
+1
+1
i wrapped json as a string in js file as a quickfix and parsing it in runtime.
@zaynyatyi it is, of course, bad solution for production releases.
I spent the day working on it, still have no idea why it happens.
It seems to be coming from the last version of babel/babylon.
Downgrading it to 6.8.1 instead of 6.8.2 fixes the issue for me.
@alwx it is, but currently it's a blocker and it's just a quick solution while there is no fix
@Bhullnatik that worked, thanks.
@Bhullnatik it works, thanks!
How did you downgraded this package? You've installed it like npm i -E [email protected] ?
@ColCh just go to node_modules/react-native and do npm i [email protected] there
No way for me. Even with this command:
cd node_modules/react-native; npm install [email protected]; cd ../../;
Build log below.
[1:41:54 PM] <START> Building in-memory fs for JavaScript
[1:41:54 PM] <END> Building in-memory fs for JavaScript (429ms)
[1:41:54 PM] <START> Building in-memory fs for Assets
[1:41:55 PM] <END> Building in-memory fs for Assets (163ms)
[1:41:55 PM] <START> Building Haste Map
[1:41:55 PM] <START> Building (deprecated) Asset Map
[1:41:55 PM] <END> Building (deprecated) Asset Map (68ms)
[1:41:55 PM] <END> Building Haste Map (852ms)
[1:41:55 PM] <END> Building Dependency Graph (20340ms)
[1:45:25 PM] <END> find dependencies (229341ms)
[node-haste] Encountered an error while persisting cache:
> Error: TimeoutError: transforming /Users/someuser/example-project/node_modules/react-native/node_modules/immutable/dist/immutable.js took longer than 301 seconds.
> You can adjust timeout via the 'transformTimeoutInterval' option
> at /Users/someuser/example-project/node_modules/react-native/packager/react-packager/src/JSTransformer/index.js:95:28
> at tryCallOne (/Users/someuser/example-project/node_modules/promise/lib/core.js:37:12)
> at /Users/someuser/example-project/node_modules/promise/lib/core.js:123:15
> at flush (/Users/someuser/example-project/node_modules/asap/raw.js:50:29)
> at _combinedTickCallback (internal/process/next_tick.js:67:7)
> at process._tickCallback (internal/process/next_tick.js:98:9)
/Users/someuser/example-project/node_modules/promise/lib/done.js:10
@ColCh what's your npm list babylon says in root of your project?
@zaynyatyi
$ npm list babylon
[email protected] /Users/someuser/Foo
βββ¬ [email protected]
β βββ [email protected]
βββ¬ [email protected]
βββ [email protected]
looks like issues fixed, you can upgrade babylon to latest (6.8.3) on
react-native
Π²Ρ, 5 ΠΈΡΠ». 2016 Π³. Π² 18:48, Max Sysoev [email protected]:
@zaynyatyi https://github.com/zaynyatyi
$ npm list babylon
[email protected] /Users/someuser/Foo
βββ¬ [email protected]
β βββ [email protected]
βββ¬ [email protected]
βββ [email protected]β
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/facebook/react-native/issues/8475#issuecomment-230518119,
or mute the thread
https://github.com/notifications/unsubscribe/AAUAMfJwoytO1yh1OemNqO1ez8-Tx4BZks5qSnzIgaJpZM4JAdFv
.
Yeah, I noticed that version bumb.
$ npm list babylon
[email protected] /Users/someuser/Foo
βββ¬ [email protected]
β βββ [email protected]
βββ¬ [email protected]
βββ [email protected]
Checked on old build which failed with [email protected] 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 run npm install react-native
Hi there! This issue is being closed because it has been inactive for a while.
But don't worry, it will live on with ProductPains! Check out its new home: https://productpains.com/post/react-native/error-building-project-transforming-indexandroidjs-took-longer-than-301-seconds
Product Pains has been very useful in highlighting the top bugs and feature requests:
https://productpains.com/product/react-native?tab=top
Also, if this issue is a bug, please consider sending a pull request with a fix.
We're still experiencing this regardless of the upgrade to [email protected]
This error can appear again because of [email protected]. You can fix this by downgrading it to [email protected]
Downgrading babel no longer fixes this starting around react native 0.43.0. It breaks the build in another way (I can't recall at the moment).
Might be related: https://github.com/facebook/react-native/issues/12590#issuecomment-313760868
i'm having the same problem with an expo app with babylon 6.18.0
I've opened a metro bug for this here https://github.com/facebook/metro/issues/111
Most helpful comment
It seems to be coming from the last version of babel/babylon.
Downgrading it to
6.8.1instead of6.8.2fixes the issue for me.