Skip to content
New issue

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

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

Already on GitHub? # to your account

New react-native deps breaks packager #77

Closed
mizinin opened this issue Oct 27, 2016 · 8 comments
Closed

New react-native deps breaks packager #77

mizinin opened this issue Oct 27, 2016 · 8 comments

Comments

@mizinin
Copy link

mizinin commented Oct 27, 2016

Packager hangs on transforming in fresh created app.
It's not a re-natal problem, but maybe someone faced that problem and know the solution.

@j-h-l
Copy link

j-h-l commented Oct 27, 2016

Sounds similar to issue #66 . try reinstalling watchman?

@itadventurer
Copy link

I am having the same problem currently. After many hours of debugging I still don't have a solution :(

How to reproduce:

re-natal init FutureApp
cd future-app
npm install
lein prod-build
react-native bundle --entry-file index.android.js --platform android --bundle-output android/app/src/main/assets/index.android.bundle

The result is always

…
Error: TimeoutError: transforming …/index.android.js took longer than 301 seconds.
…

What I have tried:

Used operating systems:

  • Mac OS Sierra (watchman was reinstalled)
  • ArchLinux
  • Debian (via docker)

Do you have any idea what the problem may be?

@jeaye
Copy link

jeaye commented Oct 30, 2016

I'm hitting this issue as well, with a fresh project, trying to run in my iOS simulator.

Commands (copied from the README verbatim -- I've also tried starting the packager manually, with no change in behavior):

npm install -g re-natal
re-natal init client -i reagent6
cd client
react-native run-ios

Output:

> client@0.0.1 start /Users/jeaye/projects/testing/client
> node_modules/react-native/packager/packager.sh --nonPersistent "--reset-cache"

Scanning 710 folders for symlinks in /Users/jeaye/projects/testing/client/node_modules (18ms)
 ┌────────────────────────────────────────────────────────────────────────────┐
 │  Running packager on port 8081.                                            │
 │                                                                            │
 │  Keep this packager running while developing on any JS projects. Feel      │
 │  free to close this tab and run your own packager instance if you          │
 │  prefer.                                                                   │
 │                                                                            │
 │  https://github.com/facebook/react-native                                  │
 │                                                                            │
 └────────────────────────────────────────────────────────────────────────────┘
Looking for JS files in
   /Users/jeaye/projects/testing/client

[10/29/2016, 10:05:46 PM] <START> Building Dependency Graph
[10/29/2016, 10:05:46 PM] <START> Crawling File System
[Hot Module Replacement] Server listening on /hot

React packager ready.

[10/29/2016, 10:05:50 PM] <END>   Crawling File System (4147ms)
[10/29/2016, 10:05:50 PM] <START> Building in-memory fs for JavaScript
[10/29/2016, 10:05:50 PM] <END>   Building in-memory fs for JavaScript (265ms)
[10/29/2016, 10:05:50 PM] <START> Building in-memory fs for Assets
[10/29/2016, 10:05:50 PM] <END>   Building in-memory fs for Assets (193ms)
[10/29/2016, 10:05:50 PM] <START> Building Haste Map
[10/29/2016, 10:05:51 PM] <START> Building (deprecated) Asset Map
[10/29/2016, 10:05:51 PM] <END>   Building (deprecated) Asset Map (87ms)
[10/29/2016, 10:05:51 PM] <END>   Building Haste Map (379ms)
[10/29/2016, 10:05:51 PM] <END>   Building Dependency Graph (4994ms)

[10/29/2016, 10:06:10 PM] <START> Requesting bundle: {"url":"/index.ios.bundle?platform=ios&dev=true&minify=false"}
[10/29/2016, 10:06:10 PM] <START> Finding dependencies
Error: TimeoutError: transforming /Users/jeaye/projects/testing/client/index.ios.js took longer than 301 seconds.
You can adjust timeout via the 'transformTimeoutInterval' option
    at _transform.then.catch.error (/Users/jeaye/projects/testing/client/node_modules/react-native/packager/react-packager/src/JSTransformer/index.js:101:30)
    at tryCallOne (/Users/jeaye/projects/testing/client/node_modules/promise/lib/core.js:37:12)
    at /Users/jeaye/projects/testing/client/node_modules/promise/lib/core.js:123:15
    at flush (/Users/jeaye/projects/testing/client/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)

@mizinin
Copy link
Author

mizinin commented Oct 30, 2016

I found the solution. Just downgrade babel plugin npm i babel-plugin-transform-es2015-block-scoping@6.15.0 after initial npm install. After that packager works well

@jeaye
Copy link

jeaye commented Oct 30, 2016

That works for me, too; thanks, @mizinin. What's the long-term fix for this, @drapanjanas et al?

@drapanjanas
Copy link
Owner

@jeaye Not too much I can think of actually. Generate project with hardocded version in package.json - not perfect as this can cause incompatibilities in future RN versions. But if no better ideas we could do that.

@jeaye
Copy link

jeaye commented Oct 31, 2016

Thanks!

@cogwheel
Copy link

cogwheel commented Jul 7, 2017

For what it's worth, the downgrade workaround no longer works. There is a bug on react-native regarding slow bundling on large javascript files: facebook/react-native#12590 (comment)

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants