-
Notifications
You must be signed in to change notification settings - Fork 904
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
"react-native start" ends with "out of memory"-failure on Node >=12.5 #485
Comments
Kindly put the output of |
I'm facing the same issue. Just updated from node v11.7 to 12.6, and now the command "react-native start" progressively consumes the entire system memory. OS npm -v node -v react-native --version Rolling back to the previous node version solves the issue |
Interesting. Are you able to provide a repro case we can download and investigate? |
It was a new empty project without any modification:
|
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
@Dom-Mac seems a problem with |
Downgrading to node v.12.4.0 solved my issue on Windows 10, too. node v 12.5.0 has the same problem as v 12.6.0. react-native-cli: 2.0.1 |
Possibly related issues in Node.js:
Closing, as that's unrelated to this CLI. Please send your detailed reports to Node.js maintainers. |
This comment has been minimized.
This comment has been minimized.
I'm getting this error too, the memory consumption grows and freeze my system... |
On osx 10.14.6 rolled all the way down to 10 to get this to work for me; brew uninstall node |
On windows 10 build 18362 version 12.5/12.4 still got the leak. 10.16.1 works fine. |
There's a PR fixing it in upstream |
Actually the "fix" in Here's a minimal reproduction of the |
@thymikee I must admit, I'm confused on how to try the workaround. If I follow the CONTRIBUTING doc and yarn link to a jest checkout of the patch-3 branch with the workaround, that will link in all the packages as well, so I would get the jest-haste-map modifications? Or maybe it would be faster to checkout the branch, build it, then just copy the built JS in there (and maybe create a patch-package patch so it's sticky)? I'm going to try this as I don't have confidence in the yarn link idea I will say I really love the way the reactxp framework distributes it's typescript and it's javascript, along with the necessary 'npm run build' command so that you can attempt hackery like this inside node_modules directly without any sort of fork/clone/build/copy messing around for quick tests - lowers the barrier to QA, but that's more of a "wouldn't it be nice..." thought for here for the future maybe :-) |
@mikehardy since this is relatively small change I'd patch it manually in node_modules |
Workaround tested and working! status (and patch-package patch) attached to comment on PR jestjs/jest#8787 (comment) |
Patch is for 24.8.0, but current module version is 24.8.1. Is it possible to get a path for the current version? patch-package 6.1.2 ERROR Failed to apply patch for package jest-haste-map at path
This error was caused because jest-haste-map has changed since you Maybe this means your patch file is no longer necessary, in which case Otherwise, you need generate a new patch file. To generate a new one, just repeat the steps you made to generate the first i.e. manually make the appropriate file changes, then run
Info: |
You'll have to hack it @cfantasy74 - just remove the hunk from crawlers/node.js (that file is modified for 24.8.0 but not needed for 24.8.1) and rename to the new patch version |
still an issue on node 12.8.1 |
@DanielTate there was nothing in the 12.8.1 changelog that would have led me to believe it would change. Here's what will cause it to change:
Could you test this on Node 12.9 and see if it fixes it for you? That would be news |
@mikehardy |
EDIT: Workaround
Downgrade to Node 12.4, see #485 (comment).
Environment
System:
OS: Windows 10
CPU: (4) x64 Intel(R) Core(TM) i7-4510U CPU @ 2.00GHz
Memory: 5.40 GB / 7.88 GB
Binaries:
Node: 12.6.0 - C:\Program Files\nodejs\node.EXE
npm: 6.9.0 - C:\Program Files\nodejs\npm.CMD
IDEs:
Android Studio: Version 3.4.0.0 AI-183.6156.11.34.5522156
Description
"react-native start" ends with "out of memory"-failure
C:\Temp\FRNA>react-native start
┌──────────────────────────────────────────────────────────────────────────────┐
│ │
│ Running Metro Bundler on port 8081. │
│ │
│ Keep Metro running while developing on any JS projects. Feel free to │
│ close this tab and run your own Metro instance if you prefer. │
│ │
│ https://github.com/facebook/react-native │
│ │
└──────────────────────────────────────────────────────────────────────────────┘
Looking for JS files in
C:\Temp\FRNA
Loading dependency graph...
<--- Last few GCs --->
[3844:00000135069CA290] 9074 ms: Scavenge 65.9 (93.0) -> 51.0 (93.0) MB, 4.1 / 0.0 ms (average mu = 0.998, current mu = 0.998) allocation failure
<--- JS stacktrace --->
==== JS stack trace =========================================
Security context: 0x029a341c0911
2: next [0000029A341E29A9](this=0x02a8d7380881 ,0x022c4d995851 <JSArray[18398]>)
3: asyncGeneratorStep(aka asyncGeneratorStep) [000000039D6EBEA1] [C:\Temp\FRNA\node_modules\jest-haste-map\build\index.js:193] [bytecode=00000340235B2529 offset=11](this=0x00bbe6dc04d1 ,0x02a8d7380881 ...
FATAL ERROR: Zone Allocation failed - process out of memory
1: 00007FF6C44B962F
2: 00007FF6C4462376
3: 00007FF6C4463036
4: 00007FF6C4C48A1E
5: 00007FF6C4C30D6A
6: 00007FF6C4758E9D
7: 00007FF6C4F7CD34
8: 00007FF6C4F7C7AD
9: 00007FF6C4F7B3BF
10: 00007FF6C50E9C26
11: 00007FF6C50C7BD6
12: 00007FF6C4FC037A
13: 00007FF6C4FDD009
14: 00007FF6C4FDD5D4
15: 00007FF6C4FDD366
16: 00007FF6C4FC150E
17: 00007FF6C4FBEAA1
18: 00007FF6C4FBAF4B
19: 00007FF6C4B7DA77
20: 00007FF6C4B7D3D1
21: 00007FF6C4B7A4A3
22: 00007FF6C48AF317
23: 00007FF6C4CF170D
24: 00007FF6C4C659EB
25: 00007FF6C4C93585
26: 00007FF6C4C65BBC
27: 00007FF6C4C65BBC
28: 00007FF6C4CB9FC2
29: 00007FF6C4C84BB2
30: 00007FF6C4C633DC
31: 00007FF6C4B0DF24
32: 00007FF6C4B0E033
33: 00007FF6C4B0E702
34: 00007FF6C49E6A05
35: 00007FF6C4C6678C
36: 00000268F35536F3
Reproducible Demo
run "react-native init FRNA"
run "react-native start"
The text was updated successfully, but these errors were encountered: