Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error building project ("transforming index.android.js took longer than 301 seconds.") #8475

Closed
alwx opened this issue Jun 28, 2016 · 23 comments
Labels
Resolution: Locked This issue was locked by the bot.

Comments

@alwx
Copy link
Contributor

alwx commented Jun 28, 2016

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.

@zaynyatyi
Copy link

I have same issues. Happened when i switched to react-native 0.28 from 0.26.3.

@alwx
Copy link
Contributor Author

alwx commented Jun 29, 2016

Downgrading doesn't help. I believe it is not a 0.28-specific issue.

@phil-allcock
Copy link

I have tried to reclone the project and still hitting the same error

@dannytip
Copy link

+1

1 similar comment
@jaiesZ
Copy link

jaiesZ commented Jun 29, 2016

+1

@zaynyatyi
Copy link

i wrapped json as a string in js file as a quickfix and parsing it in runtime.

@alwx
Copy link
Contributor Author

alwx commented Jun 29, 2016

@zaynyatyi it is, of course, bad solution for production releases.
I spent the day working on it, still have no idea why it happens.

@Bhullnatik
Copy link
Contributor

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.

@zaynyatyi
Copy link

@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.

@alwx
Copy link
Contributor Author

alwx commented Jun 29, 2016

@Bhullnatik it works, thanks!

@ColCh
Copy link
Contributor

ColCh commented Jul 1, 2016

How did you downgraded this package? You've installed it like npm i -E babylon@6.8.1 ?

@zaynyatyi
Copy link

@ColCh just go to node_modules/react-native and do npm i babylon@6.8.1 there

@ColCh
Copy link
Contributor

ColCh commented Jul 4, 2016

No way for me. Even with this command:

cd node_modules/react-native; npm install babylon@6.8.1; 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

@zaynyatyi
Copy link

@ColCh what's your npm list babylon says in root of your project?

@ColCh
Copy link
Contributor

ColCh commented Jul 5, 2016

@zaynyatyi

$ npm list babylon
Foo@0.0.1 /Users/someuser/Foo
├─┬ babel-core@6.10.4
│ └── babylon@6.8.3 
└─┬ react-native@0.28.0
  └── babylon@6.8.1 

@zaynyatyi
Copy link

looks like issues fixed, you can upgrade babylon to latest (6.8.3) on
react-native

вт, 5 июл. 2016 г. в 18:48, Max Sysoev notifications@github.com:

@zaynyatyi https://github.com/zaynyatyi

$ npm list babylon
Foo@0.0.1 /Users/someuser/Foo
├─┬ babel-core@6.10.4
│ └── babylon@6.8.3
└─┬ react-native@0.28.0
└── babylon@6.8.1


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#8475 (comment),
or mute the thread
https://github.com/notifications/unsubscribe/AAUAMfJwoytO1yh1OemNqO1ez8-Tx4BZks5qSnzIgaJpZM4JAdFv
.

@ColCh
Copy link
Contributor

ColCh commented Jul 5, 2016

Yeah, I noticed that version bumb.

$ npm list babylon
Foo@0.0.1 /Users/someuser/Foo
├─┬ babel-core@6.10.4
│ └── babylon@6.8.3 
└─┬ react-native@0.28.0
  └── babylon@6.8.3 

Checked on old build which failed with babylon@6.8.1 now builds succesfully... Nice! 👍

RN depends on "babylon": "^6.8.2", ( 8b803c6 ), and according to semver, 6.8.3 will be installed, if you run npm install react-native

@mkonicek
Copy link
Contributor

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.

@0xc1c4da
Copy link

We're still experiencing this regardless of the upgrade to react-native@0.36.0

@rasom
Copy link

rasom commented Oct 30, 2016

This error can appear again because of babel-plugin-transform-es2015-block-scoping@6.18.0. You can fix this by downgrading it to babel-plugin-transform-es2015-block-scoping@6.15.0

babel/babel#4795

glittershark added a commit to dmistomin/project-illithid that referenced this issue Jan 22, 2017
@cogwheel
Copy link

cogwheel commented Jul 7, 2017

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: #12590 (comment)

@tobowers
Copy link

tobowers commented Nov 26, 2017

i'm having the same problem with an expo app with babylon 6.18.0

@jeaye
Copy link

jeaye commented Dec 28, 2017

I've opened a metro bug for this here facebook/metro#111

@facebook facebook locked as resolved and limited conversation to collaborators Jul 19, 2018
@react-native-bot react-native-bot added the Resolution: Locked This issue was locked by the bot. label Jul 19, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Resolution: Locked This issue was locked by the bot.
Projects
None yet
Development

No branches or pull requests