facebook / create-react-app

Set up a modern web app by running one command.
https://create-react-app.dev
MIT License
102.65k stars 26.81k forks source link

npm start gives error #10090

Open audriusl opened 3 years ago

audriusl commented 3 years ago

Npm start throws error. Project was created with npx create-react-app

FATAL ERROR: WasmCodeManager::Commit: Cannot make pre-reserved region writable Allocation failed - process out of memory

Error log 0 info it worked if it ends with ok 1 verbose cli [ 1 verbose cli '/opt/homebrew/Cellar/node/15.2.1/bin/node', 1 verbose cli '/opt/homebrew/bin/npm', 1 verbose cli 'start' 1 verbose cli ] 2 info using npm@6.14.8 3 info using node@v15.2.1 4 verbose run-script [ 'prestart', 'start', 'poststart' ] 5 info lifecycle test@0.1.0~prestart: test@0.1.0 6 info lifecycle test@0.1.0~start: test@0.1.0 7 verbose lifecycle test@0.1.0~start: unsafe-perm in lifecycle true 8 verbose lifecycle test@0.1.0~start: PATH: /opt/homebrew/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/Users/audrius/code/react/fullstackopen/exercises/test/node_modules/.bin:/opt/homebr$ 9 verbose lifecycle test@0.1.0~start: CWD: /Users/audrius/code/react/fullstackopen/exercises/test 10 silly lifecycle test@0.1.0~start: Args: [ '-c', 'react-scripts start' ] 11 silly lifecycle test@0.1.0~start: Returned: code: 1 signal: null 12 info lifecycle test@0.1.0~start: Failed to exec start script 13 verbose stack Error: test@0.1.0 start: react-scripts start 13 verbose stack Exit status 1 13 verbose stack at EventEmitter. (/opt/homebrew/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:332:16) 13 verbose stack at EventEmitter.emit (node:events:329:20) 13 verbose stack at ChildProcess. (/opt/homebrew/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14) 13 verbose stack at ChildProcess.emit (node:events:329:20) 13 verbose stack at maybeClose (node:internal/child_process:1055:16) 13 verbose stack at Process.ChildProcess._handle.onexit (node:internal/child_process:288:5) 14 verbose pkgid test@0.1.0 15 verbose cwd /Users/audrius/code/react/fullstackopen/exercises/test 16 verbose Darwin 20.1.0 17 verbose argv "/opt/homebrew/Cellar/node/15.2.1/bin/node" "/opt/homebrew/bin/npm" "start" 18 verbose node v15.2.1 19 verbose npm v6.14.8 20 error code ELIFECYCLE 21 error errno 1 22 error test@0.1.0 start: react-scripts start 22 error Exit status 1 23 error Failed at the test@0.1.0 start script. 23 error This is probably not a problem with npm. There is likely additional logging output above. 24 verbose exit [ 1, true ]

My system: System: OS: macOS 11.0.1 CPU: (8) arm64 Apple processor Binaries: Node: 15.2.1 - /opt/homebrew/bin/node Yarn: Not Found npm: 6.14.8 - /opt/homebrew/bin/npm Browsers: Chrome: Not Found Edge: Not Found Firefox: Not Found Safari: 14.0.1 npmPackages: react: ^17.0.1 => 17.0.1 react-dom: ^17.0.1 => 17.0.1 react-scripts: 4.0.0 => 4.0.0 npmGlobalPackages: create-react-app: Not Found

Murali-Kwikee commented 3 years ago

Yep, getting this too, but only during build

eugene1g commented 3 years ago

Somehow this is caused by react-refresh-webpack-plugin. If I disable it, the app works as expected for me env FAST_REFRESH=false npm start

petetnt commented 3 years ago

Is this on Apple silicon?

pmmmwh commented 3 years ago

Hi - as far as I understand this error is only happening on Apple Silicon M1 based devices.

Somehow this is caused by react-refresh-webpack-plugin. If I disable it, the app works as expected for me env FAST_REFRESH=false npm start

This mostly is not use but rather upstream - some packages in the HMR hot path (like source-map (source map generation) and chokidar (file watching)) depends on WASM or native capabilities, which with Node.js not even having proper support for the platform, is bound to fail.

You could try to lower the actual amount of memory Node.js would try to allocate to potentially evade the issue (ref: pmmmwh/react-refresh-webpack-plugin#259)

eugene1g commented 3 years ago

@pmmmwh is correct - the issue is way upstream from CRA or react-refresh, and it has been fixed in Node at https://github.com/nodejs/node/commit/c1442ec9c45cecf156fb32ad2174c4aceef37de7 (I confirmed by compiling from that commit and it works as expected). That commit is not yet included in any released versions, but Node folks are hard at making a stable Apple Silicon version for us, so we'll just wait.

audriusl commented 3 years ago

Great that the fix is coming. And I confirm that it works with env FAST_REFRESH=false npm start

joshuajung commented 3 years ago

@pmmmwh is correct - the issue is way upstream from CRA or react-refresh, and it has been fixed in Node at nodejs/node@c1442ec (...)

This has been released today in Node 15.3.0. Can confirm that the error has disappeared for me after the update.

stale[bot] commented 3 years ago

This issue has been automatically marked as stale because it has not had any recent activity. It will be closed in 5 days if no further activity occurs.

MasatoshiTada commented 3 years ago

I have the same problem.

Environment

Logs

Starting the development server...
#
# Fatal error in , line 0
# Check failed: allocator->SetPermissions(reinterpret_cast<void*>(region.begin()), region.size(), PageAllocator::kNoAccess).
#
#
#
#FailureMessage Object: 0x16d6eb818
 1: 0x102801104 node::NodePlatform::GetStackTracePrinter()::$_3::__invoke() [/opt/homebrew/Cellar/node/15.8.0/bin/node]
 2: 0x10318c054 V8_Fatal(char const*, ...) [/opt/homebrew/Cellar/node/15.8.0/bin/node]
 3: 0x102d75358 v8::internal::wasm::WasmCodeAllocator::GetNumCodeSpaces() const [/opt/homebrew/Cellar/node/15.8.0/bin/node]
 4: 0x102d751f8 v8::internal::wasm::WasmCodeAllocator::FreeCode(v8::internal::Vector<v8::internal::wasm::WasmCode* const>) [/opt/homebrew/Cellar/node/15.8.0/bin/node]
 5: 0x102d78048 v8::internal::wasm::NativeModule::FreeCode(v8::internal::Vector<v8::internal::wasm::WasmCode* const>) [/opt/homebrew/Cellar/node/15.8.0/bin/node]
 6: 0x102d85bcc v8::internal::wasm::WasmEngine::FreeDeadCodeLocked(std::__1::unordered_map<v8::internal::wasm::NativeModule*, std::__1::vector<v8::internal::wasm::WasmCode*, std::__1::allocator<v8::internal::wasm::WasmCode*> >, std::__1::hash<v8::internal::wasm::NativeModule*>, std::__1::equal_to<v8::internal::wasm::NativeModule*>, std::__1::allocator<std::__1::pair<v8::internal::wasm::NativeModule* const, std::__1::vector<v8::internal::wasm::WasmCode*, std::__1::allocator<v8::internal::wasm::WasmCode*> > > > > const&) [/opt/homebrew/Cellar/node/15.8.0/bin/node]
 7: 0x102d83bec v8::internal::wasm::WasmEngine::PotentiallyFinishCurrentGC() [/opt/homebrew/Cellar/node/15.8.0/bin/node]
 8: 0x102d84e28 v8::internal::wasm::WasmEngine::ReportLiveCodeForGC(v8::internal::Isolate*, v8::internal::Vector<v8::internal::wasm::WasmCode*>) [/opt/homebrew/Cellar/node/15.8.0/bin/node]
 9: 0x102d85118 v8::internal::wasm::WasmEngine::ReportLiveCodeFromStackForGC(v8::internal::Isolate*) [/opt/homebrew/Cellar/node/15.8.0/bin/node]
10: 0x1029e8ea4 v8::internal::StackGuard::HandleInterrupts() [/opt/homebrew/Cellar/node/15.8.0/bin/node]
11: 0x102c78938 v8::internal::Runtime_StackGuard(int, unsigned long*, v8::internal::Isolate*) [/opt/homebrew/Cellar/node/15.8.0/bin/node]
12: 0x102efa78c Builtins_CEntry_Return1_DontSaveFPRegs_ArgvOnStack_NoBuiltinExit [/opt/homebrew/Cellar/node/15.8.0/bin/node]
13: 0x102e93530 Builtins_InterpreterEntryTrampoline [/opt/homebrew/Cellar/node/15.8.0/bin/node]
14: 0x102e93494 Builtins_InterpreterEntryTrampoline [/opt/homebrew/Cellar/node/15.8.0/bin/node]
15: 0x102e93494 Builtins_InterpreterEntryTrampoline [/opt/homebrew/Cellar/node/15.8.0/bin/node]
16: 0x102e93494 Builtins_InterpreterEntryTrampoline [/opt/homebrew/Cellar/node/15.8.0/bin/node]
17: 0x102e93494 Builtins_InterpreterEntryTrampoline [/opt/homebrew/Cellar/node/15.8.0/bin/node]
18: 0x102e93494 Builtins_InterpreterEntryTrampoline [/opt/homebrew/Cellar/node/15.8.0/bin/node]
19: 0x102e93494 Builtins_InterpreterEntryTrampoline [/opt/homebrew/Cellar/node/15.8.0/bin/node]
20: 0x102e8aac4 Builtins_ArgumentsAdaptorTrampoline [/opt/homebrew/Cellar/node/15.8.0/bin/node]
21: 0x102e93494 Builtins_InterpreterEntryTrampoline [/opt/homebrew/Cellar/node/15.8.0/bin/node]
22: 0x102e93494 Builtins_InterpreterEntryTrampoline [/opt/homebrew/Cellar/node/15.8.0/bin/node]
23: 0x102e93494 Builtins_InterpreterEntryTrampoline [/opt/homebrew/Cellar/node/15.8.0/bin/node]
24: 0x102e93494 Builtins_InterpreterEntryTrampoline [/opt/homebrew/Cellar/node/15.8.0/bin/node]
25: 0x102e93494 Builtins_InterpreterEntryTrampoline [/opt/homebrew/Cellar/node/15.8.0/bin/node]
26: 0x102e8aac4 Builtins_ArgumentsAdaptorTrampoline [/opt/homebrew/Cellar/node/15.8.0/bin/node]
27: 0x102e93494 Builtins_InterpreterEntryTrampoline [/opt/homebrew/Cellar/node/15.8.0/bin/node]
28: 0x102e93494 Builtins_InterpreterEntryTrampoline [/opt/homebrew/Cellar/node/15.8.0/bin/node]
29: 0x102e93494 Builtins_InterpreterEntryTrampoline [/opt/homebrew/Cellar/node/15.8.0/bin/node]
30: 0x102e93494 Builtins_InterpreterEntryTrampoline [/opt/homebrew/Cellar/node/15.8.0/bin/node]
31: 0x102e93494 Builtins_InterpreterEntryTrampoline [/opt/homebrew/Cellar/node/15.8.0/bin/node]
32: 0x102e93494 Builtins_InterpreterEntryTrampoline [/opt/homebrew/Cellar/node/15.8.0/bin/node]
33: 0x102e93494 Builtins_InterpreterEntryTrampoline [/opt/homebrew/Cellar/node/15.8.0/bin/node]
34: 0x102e93494 Builtins_InterpreterEntryTrampoline [/opt/homebrew/Cellar/node/15.8.0/bin/node]
35: 0x102e93494 Builtins_InterpreterEntryTrampoline [/opt/homebrew/Cellar/node/15.8.0/bin/node]
36: 0x102e93494 Builtins_InterpreterEntryTrampoline [/opt/homebrew/Cellar/node/15.8.0/bin/node]
37: 0x102e93494 Builtins_InterpreterEntryTrampoline [/opt/homebrew/Cellar/node/15.8.0/bin/node]
38: 0x102e93494 Builtins_InterpreterEntryTrampoline [/opt/homebrew/Cellar/node/15.8.0/bin/node]
39: 0x102e93494 Builtins_InterpreterEntryTrampoline [/opt/homebrew/Cellar/node/15.8.0/bin/node]
40: 0x102e93494 Builtins_InterpreterEntryTrampoline [/opt/homebrew/Cellar/node/15.8.0/bin/node]
41: 0x102e93494 Builtins_InterpreterEntryTrampoline [/opt/homebrew/Cellar/node/15.8.0/bin/node]
42: 0x102e93494 Builtins_InterpreterEntryTrampoline [/opt/homebrew/Cellar/node/15.8.0/bin/node]
43: 0x102e93494 Builtins_InterpreterEntryTrampoline [/opt/homebrew/Cellar/node/15.8.0/bin/node]
44: 0x102e93494 Builtins_InterpreterEntryTrampoline [/opt/homebrew/Cellar/node/15.8.0/bin/node]
45: 0x102e93494 Builtins_InterpreterEntryTrampoline [/opt/homebrew/Cellar/node/15.8.0/bin/node]
46: 0x102e93494 Builtins_InterpreterEntryTrampoline [/opt/homebrew/Cellar/node/15.8.0/bin/node]
47: 0x102e93494 Builtins_InterpreterEntryTrampoline [/opt/homebrew/Cellar/node/15.8.0/bin/node]
48: 0x102e93494 Builtins_InterpreterEntryTrampoline [/opt/homebrew/Cellar/node/15.8.0/bin/node]
49: 0x102e93494 Builtins_InterpreterEntryTrampoline [/opt/homebrew/Cellar/node/15.8.0/bin/node]
50: 0x102e93494 Builtins_InterpreterEntryTrampoline [/opt/homebrew/Cellar/node/15.8.0/bin/node]
51: 0x102e93494 Builtins_InterpreterEntryTrampoline [/opt/homebrew/Cellar/node/15.8.0/bin/node]
52: 0x102e93494 Builtins_InterpreterEntryTrampoline [/opt/homebrew/Cellar/node/15.8.0/bin/node]
53: 0x102e93494 Builtins_InterpreterEntryTrampoline [/opt/homebrew/Cellar/node/15.8.0/bin/node]
54: 0x102e93494 Builtins_InterpreterEntryTrampoline [/opt/homebrew/Cellar/node/15.8.0/bin/node]
55: 0x102e93494 Builtins_InterpreterEntryTrampoline [/opt/homebrew/Cellar/node/15.8.0/bin/node]
56: 0x102e93494 Builtins_InterpreterEntryTrampoline [/opt/homebrew/Cellar/node/15.8.0/bin/node]
57: 0x102e93494 Builtins_InterpreterEntryTrampoline [/opt/homebrew/Cellar/node/15.8.0/bin/node]
58: 0x102e93494 Builtins_InterpreterEntryTrampoline [/opt/homebrew/Cellar/node/15.8.0/bin/node]
59: 0x102e93494 Builtins_InterpreterEntryTrampoline [/opt/homebrew/Cellar/node/15.8.0/bin/node]
60: 0x102e93494 Builtins_InterpreterEntryTrampoline [/opt/homebrew/Cellar/node/15.8.0/bin/node]
61: 0x102e93494 Builtins_InterpreterEntryTrampoline [/opt/homebrew/Cellar/node/15.8.0/bin/node]
62: 0x102e93494 Builtins_InterpreterEntryTrampoline [/opt/homebrew/Cellar/node/15.8.0/bin/node]
63: 0x102e93494 Builtins_InterpreterEntryTrampoline [/opt/homebrew/Cellar/node/15.8.0/bin/node]
64: 0x102e8aac4 Builtins_ArgumentsAdaptorTrampoline [/opt/homebrew/Cellar/node/15.8.0/bin/node]
65: 0x102e93494 Builtins_InterpreterEntryTrampoline [/opt/homebrew/Cellar/node/15.8.0/bin/node]
66: 0x102e8aac4 Builtins_ArgumentsAdaptorTrampoline [/opt/homebrew/Cellar/node/15.8.0/bin/node]
67: 0x102e93494 Builtins_InterpreterEntryTrampoline [/opt/homebrew/Cellar/node/15.8.0/bin/node]
68: 0x102e93494 Builtins_InterpreterEntryTrampoline [/opt/homebrew/Cellar/node/15.8.0/bin/node]
69: 0x102e93494 Builtins_InterpreterEntryTrampoline [/opt/homebrew/Cellar/node/15.8.0/bin/node]
70: 0x102e93494 Builtins_InterpreterEntryTrampoline [/opt/homebrew/Cellar/node/15.8.0/bin/node]
71: 0x102e93494 Builtins_InterpreterEntryTrampoline [/opt/homebrew/Cellar/node/15.8.0/bin/node]
72: 0x102e8aac4 Builtins_ArgumentsAdaptorTrampoline [/opt/homebrew/Cellar/node/15.8.0/bin/node]
73: 0x102e93494 Builtins_InterpreterEntryTrampoline [/opt/homebrew/Cellar/node/15.8.0/bin/node]
74: 0x102e8aac4 Builtins_ArgumentsAdaptorTrampoline [/opt/homebrew/Cellar/node/15.8.0/bin/node]
75: 0x102e93494 Builtins_InterpreterEntryTrampoline [/opt/homebrew/Cellar/node/15.8.0/bin/node]
76: 0x102f46a1c Builtins_PromiseFulfillReactionJob [/opt/homebrew/Cellar/node/15.8.0/bin/node]
77: 0x102eb2608 Builtins_RunMicrotasks [/opt/homebrew/Cellar/node/15.8.0/bin/node]
78: 0x102e90c28 Builtins_JSRunMicrotasksEntry [/opt/homebrew/Cellar/node/15.8.0/bin/node]
79: 0x160008000 
npm ERR! code 1
npm ERR! path /Users/tada/react-my-app
npm ERR! command failed
npm ERR! command sh -c react-scripts start
npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/tada/.npm/_logs/2021-02-09T02_28_34_499Z-debug.log
➜  react-my-app git:(master) cat /Users/tada/.npm/_logs/2021-02-09T02_28_34_499Z-debug.log
0 verbose cli [
0 verbose cli   '/opt/homebrew/Cellar/node/15.8.0/bin/node',
0 verbose cli   '/opt/homebrew/bin/npm',
0 verbose cli   'start'
0 verbose cli ]
1 info using npm@7.5.0
2 info using node@v15.8.0
3 timing config:load:defaults Completed in 0ms
4 timing config:load:file:/opt/homebrew/lib/node_modules/npm/npmrc Completed in 1ms
5 timing config:load:builtin Completed in 1ms
6 timing config:load:cli Completed in 0ms
7 timing config:load:env Completed in 1ms
8 timing config:load:file:/Users/tada/react-my-app/.npmrc Completed in 0ms
9 timing config:load:project Completed in 0ms
10 timing config:load:file:/Users/tada/.npmrc Completed in 0ms
11 timing config:load:user Completed in 0ms
12 timing config:load:file:/opt/homebrew/etc/npmrc Completed in 0ms
13 timing config:load:global Completed in 0ms
14 timing config:load:cafile Completed in 0ms
15 timing config:load:validate Completed in 0ms
16 timing config:load:setUserAgent Completed in 0ms
17 timing config:load:setEnvs Completed in 1ms
18 timing config:load Completed in 3ms
19 verbose npm-session e5008ff24653bba1
20 timing npm:load Completed in 6ms
21 timing command:run-script Completed in 2224ms
22 timing command:start Completed in 2226ms
23 verbose stack Error: command failed
23 verbose stack     at ChildProcess.<anonymous> (/opt/homebrew/lib/node_modules/npm/node_modules/@npmcli/promise-spawn/index.js:64:27)
23 verbose stack     at ChildProcess.emit (node:events:378:20)
23 verbose stack     at maybeClose (node:internal/child_process:1067:16)
23 verbose stack     at Process.ChildProcess._handle.onexit (node:internal/child_process:301:5)
24 verbose pkgid react-my-app@0.1.0
25 verbose cwd /Users/tada/react-my-app
26 verbose Darwin 20.3.0
27 verbose argv "/opt/homebrew/Cellar/node/15.8.0/bin/node" "/opt/homebrew/bin/npm" "start"
28 verbose node v15.8.0
29 verbose npm  v7.5.0
30 error code 1
31 error path /Users/tada/react-my-app
32 error command failed
33 error command sh -c react-scripts start
34 verbose exit 1
eugene1g commented 3 years ago

@MasatoshiTada This might be related https://github.com/nodejs/node/issues/37061

dhyeyshah commented 3 years ago

any updates on this?...I am still facing this problem when I do npm start, with node v15.8.0 and big sur 11.2.1 m1 macbook air

dhyeyshah commented 3 years ago

it is now working from big sur 11.2.2 on m1 macs, node v15.10.0 and react-scripts 4.0.3

we can close this issue now

liesislukas commented 3 years ago

node v12.21.0 react-scripts 4.0.3 Big Sur 11.2.3 M1 chip

I know node v12 is not the newest, yet I use it with other things, while some aws lambda integrations still require v12 even lambda itself supports v14 but this is all out of scope of this thread.

any hope to have this fixed for node v12 and v14 while both are in LTS. I can confirm it works with node v15, but not with v14 or v12.

https://nodejs.org/en/about/releases/

> ....@2.0.1 start /Users/lukas/Desktop/www/...
> react-scripts start

ℹ 「wds」: Project is running at http://192.168.1.123/
ℹ 「wds」: webpack output is served from /app
ℹ 「wds」: Content not from webpack is served from /Users/lukas/Desktop/www/..../public
ℹ 「wds」: 404s will fallback to /app/
Starting the development server...

<--- Last few GCs --->

[12166:0x158008000]     1523 ms: Scavenge 65.7 (93.0) -> 55.5 (93.0) MB, 1.2 / 0.0 ms  (average mu = 0.997, current mu = 0.997) allocation failure
[12166:0x158008000]     1750 ms: Scavenge 70.3 (93.2) -> 60.2 (94.8) MB, 3.8 / 0.0 ms  (average mu = 0.997, current mu = 0.997) allocation failure
[12166:0x158008000]     1815 ms: Scavenge 74.6 (95.5) -> 62.7 (98.0) MB, 1.3 / 0.0 ms  (average mu = 0.997, current mu = 0.997) allocation failure

<--- JS stacktrace --->

FATAL ERROR: wasm code commit Allocation failed - process out of memory
 1: 0x1045e9a60 node::Abort() [/opt/homebrew/Cellar/node@12/12.21.0_1/bin/node]
 2: 0x1045e9be0 std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >::basic_string<std::nullptr_t>(char const*) [/opt/homebrew/Cellar/node@12/12.21.0_1/bin/node]
 3: 0x1046ef748 v8::Utils::ReportOOMFailure(v8::internal::Isolate*, char const*, bool) [/opt/homebrew/Cellar/node@12/12.21.0_1/bin/node]
 4: 0x1046ef6dc v8::internal::V8::FatalProcessOutOfMemory(v8::internal::Isolate*, char const*, bool) [/opt/homebrew/Cellar/node@12/12.21.0_1/bin/node]
 5: 0x104b2027c v8::internal::wasm::WasmCodeAllocator::AllocateForCodeInRegion(v8::internal::wasm::NativeModule*, unsigned long, v8::base::AddressRegion) [/opt/homebrew/Cellar/node@12/12.21.0_1/bin/node]
 6: 0x104b20ef8 v8::internal::wasm::NativeModule::CreateEmptyJumpTableInRegion(unsigned int, v8::base::AddressRegion) [/opt/homebrew/Cellar/node@12/12.21.0_1/bin/node]
 7: 0x104b204c0 v8::internal::wasm::NativeModule::AddCodeSpace(v8::base::AddressRegion) [/opt/homebrew/Cellar/node@12/12.21.0_1/bin/node]
 8: 0x104b20d40 v8::internal::wasm::NativeModule::NativeModule(v8::internal::wasm::WasmEngine*, v8::internal::wasm::WasmFeatures const&, bool, v8::internal::VirtualMemory, std::__1::shared_ptr<v8::internal::wasm::WasmModule const>, std::__1::shared_ptr<v8::internal::Counters>, std::__1::shared_ptr<v8::internal::wasm::NativeModule>*) [/opt/homebrew/Cellar/node@12/12.21.0_1/bin/node]
 9: 0x104b22c40 v8::internal::wasm::WasmCodeManager::NewNativeModule(v8::internal::wasm::WasmEngine*, v8::internal::Isolate*, v8::internal::wasm::WasmFeatures const&, unsigned long, bool, std::__1::shared_ptr<v8::internal::wasm::WasmModule const>) [/opt/homebrew/Cellar/node@12/12.21.0_1/bin/node]
10: 0x104b28f98 v8::internal::wasm::WasmEngine::NewNativeModule(v8::internal::Isolate*, v8::internal::wasm::WasmFeatures const&, unsigned long, bool, std::__1::shared_ptr<v8::internal::wasm::WasmModule const>) [/opt/homebrew/Cellar/node@12/12.21.0_1/bin/node]
11: 0x104b28ee0 v8::internal::wasm::WasmEngine::NewNativeModule(v8::internal::Isolate*, v8::internal::wasm::WasmFeatures const&, std::__1::shared_ptr<v8::internal::wasm::WasmModule const>) [/opt/homebrew/Cellar/node@12/12.21.0_1/bin/node]
12: 0x104b075b8 v8::internal::wasm::AsyncCompileJob::CreateNativeModule(std::__1::shared_ptr<v8::internal::wasm::WasmModule const>) [/opt/homebrew/Cellar/node@12/12.21.0_1/bin/node]
13: 0x104b0ea9c v8::internal::wasm::AsyncCompileJob::PrepareAndStartCompile::RunInForeground(v8::internal::wasm::AsyncCompileJob*) [/opt/homebrew/Cellar/node@12/12.21.0_1/bin/node]
14: 0x104b0f248 v8::internal::wasm::AsyncCompileJob::CompileStep::Run(v8::internal::wasm::AsyncCompileJob*, bool) [/opt/homebrew/Cellar/node@12/12.21.0_1/bin/node]
15: 0x104b0f158 v8::internal::wasm::AsyncCompileJob::CompileTask::RunInternal() [/opt/homebrew/Cellar/node@12/12.21.0_1/bin/node]
16: 0x10463f890 node::PerIsolatePlatformData::RunForegroundTask(std::__1::unique_ptr<v8::Task, std::__1::default_delete<v8::Task> >) [/opt/homebrew/Cellar/node@12/12.21.0_1/bin/node]
17: 0x10463eab4 node::PerIsolatePlatformData::FlushForegroundTasksInternal() [/opt/homebrew/Cellar/node@12/12.21.0_1/bin/node]
18: 0x104c346d8 uv__async_io [/opt/homebrew/Cellar/node@12/12.21.0_1/bin/node]
19: 0x104c4424c uv__io_poll [/opt/homebrew/Cellar/node@12/12.21.0_1/bin/node]
20: 0x104c34af8 uv_run [/opt/homebrew/Cellar/node@12/12.21.0_1/bin/node]
21: 0x10461f800 node::NodeMainInstance::Run() [/opt/homebrew/Cellar/node@12/12.21.0_1/bin/node]
22: 0x1045c6998 node::Start(int, char**) [/opt/homebrew/Cellar/node@12/12.21.0_1/bin/node]
23: 0x1a007df34 start [/usr/lib/system/libdyld.dylib]
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! ...@2.0.1 start: `react-scripts start`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the ...@2.0.1 start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/lukas/.npm/_logs/2021-03-10T21_22_20_832Z-debug.log
MasatoshiTada commented 3 years ago

Resolved! npm start is working.

Harshadcse commented 3 years ago

`<--- Last few GCs --->

[52971:0x160008000] 158 ms: Mark-sweep 14.6 (30.4) -> 10.3 (31.0) MB, 0.9 / 0.0 ms (+ 0.1 ms in 5 steps since start of marking, biggest step 0.0 ms, walltime since start of marking 4 ms) (average mu = 1.000, current mu = 1.000) finalize incremental [52971:0x160008000] 198 ms: Scavenge 19.9 (31.5) -> 13.7 (31.3) MB, 0.6 / 0.0 ms (average mu = 1.000, current mu = 1.000) allocation failure

<--- JS stacktrace --->

FATAL ERROR: wasm code commit Allocation failed - process out of memory 1: 0x1010759d8 node::Abort() [/Users/eventtan/.nvm/versions/node/v14.16.1/bin/node] 2: 0x101075b58 node::errors::TryCatchScope::~TryCatchScope() [/Users/eventtan/.nvm/versions/node/v14.16.1/bin/node] 3: 0x10118f330 v8::Utils::ReportOOMFailure(v8::internal::Isolate, char const, bool) [/Users/eventtan/.nvm/versions/node/v14.16.1/bin/node] 4: 0x10118f2c4 v8::internal::V8::FatalProcessOutOfMemory(v8::internal::Isolate, char const, bool) [/Users/eventtan/.nvm/versions/node/v14.16.1/bin/node] 5: 0x101724cbc v8::internal::wasm::WasmCodeAllocator::AllocateForCodeInRegion(v8::internal::wasm::NativeModule, unsigned long, v8::base::AddressRegion, v8::internal::wasm::WasmCodeAllocator::OptionalLock const&) [/Users/eventtan/.nvm/versions/node/v14.16.1/bin/node] 6: 0x101725950 v8::internal::wasm::NativeModule::CreateEmptyJumpTableInRegion(int, v8::base::AddressRegion, v8::internal::wasm::WasmCodeAllocator::OptionalLock const&) [/Users/eventtan/.nvm/versions/node/v14.16.1/bin/node] 7: 0x101724618 v8::internal::wasm::NativeModule::AddCodeSpace(v8::base::AddressRegion, v8::internal::wasm::WasmCodeAllocator::OptionalLock const&) [/Users/eventtan/.nvm/versions/node/v14.16.1/bin/node] 8: 0x101725760 v8::internal::wasm::NativeModule::NativeModule(v8::internal::wasm::WasmEngine, v8::internal::wasm::WasmFeatures const&, v8::internal::VirtualMemory, std::1::shared_ptr, std::__1::shared_ptr, std::1::shared_ptr) [/Users/eventtan/.nvm/versions/node/v14.16.1/bin/node] 9: 0x101727cd4 v8::internal::wasm::WasmCodeManager::NewNativeModule(v8::internal::wasm::WasmEngine, v8::internal::Isolate, v8::internal::wasm::WasmFeatures const&, unsigned long, std::__1::shared_ptr) [/Users/eventtan/.nvm/versions/node/v14.16.1/bin/node] 10: 0x1017337e8 v8::internal::wasm::WasmEngine::NewNativeModule(v8::internal::Isolate, v8::internal::wasm::WasmFeatures const&, std::__1::shared_ptr, unsigned long) [/Users/eventtan/.nvm/versions/node/v14.16.1/bin/node] 11: 0x101700110 v8::internal::wasm::CompileToNativeModule(v8::internal::Isolate, v8::internal::wasm::WasmFeatures const&, v8::internal::wasm::ErrorThrower, std::__1::shared_ptr, v8::internal::wasm::ModuleWireBytes const&, v8::internal::Handle) [/Users/eventtan/.nvm/versions/node/v14.16.1/bin/node] 12: 0x10173063c v8::internal::wasm::WasmEngine::SyncCompile(v8::internal::Isolate, v8::internal::wasm::WasmFeatures const&, v8::internal::wasm::ErrorThrower, v8::internal::wasm::ModuleWireBytes const&) [/Users/eventtan/.nvm/versions/node/v14.16.1/bin/node] 13: 0x101757344 v8::(anonymous namespace)::WebAssemblyModule(v8::FunctionCallbackInfo const&) [/Users/eventtan/.nvm/versions/node/v14.16.1/bin/node] 14: 0x1011f8040 v8::internal::FunctionCallbackArguments::Call(v8::internal::CallHandlerInfo) [/Users/eventtan/.nvm/versions/node/v14.16.1/bin/node] 15: 0x1011f73a4 v8::internal::MaybeHandle v8::internal::(anonymous namespace)::HandleApiCallHelper(v8::internal::Isolate, v8::internal::Handle, v8::internal::Handle, v8::internal::Handle, v8::internal::Handle, v8::internal::BuiltinArguments) [/Users/eventtan/.nvm/versions/node/v14.16.1/bin/node] 16: 0x1011f6ea0 v8::internal::Builtin_Impl_HandleApiCall(v8::internal::BuiltinArguments, v8::internal::Isolate*) [/Users/eventtan/.nvm/versions/node/v14.16.1/bin/node] 17: 0x10190cfcc Builtins_CEntry_Return1_DontSaveFPRegs_ArgvOnStack_BuiltinExit [/Users/eventtan/.nvm/versions/node/v14.16.1/bin/node] 18: 0x1018a177c Builtins_JSBuiltinsConstructStub [/Users/eventtan/.nvm/versions/node/v14.16.1/bin/node] 19: 0x101989f0c Builtins_ConstructHandler [/Users/eventtan/.nvm/versions/node/v14.16.1/bin/node] 20: 0x1018a5c34 Builtins_InterpreterEntryTrampoline [/Users/eventtan/.nvm/versions/node/v14.16.1/bin/node] 21: 0x1018a5c34 Builtins_InterpreterEntryTrampoline [/Users/eventtan/.nvm/versions/node/v14.16.1/bin/node] 22: 0x10189ea04 Builtins_ArgumentsAdaptorTrampoline [/Users/eventtan/.nvm/versions/node/v14.16.1/bin/node] 23: 0x1018a5c34 Builtins_InterpreterEntryTrampoline [/Users/eventtan/.nvm/versions/node/v14.16.1/bin/node] 24: 0x1018a5c34 Builtins_InterpreterEntryTrampoline [/Users/eventtan/.nvm/versions/node/v14.16.1/bin/node] 25: 0x1018a5c34 Builtins_InterpreterEntryTrampoline [/Users/eventtan/.nvm/versions/node/v14.16.1/bin/node] 26: 0x1018a5c34 Builtins_InterpreterEntryTrampoline [/Users/eventtan/.nvm/versions/node/v14.16.1/bin/node] 27: 0x1018a5c34 Builtins_InterpreterEntryTrampoline [/Users/eventtan/.nvm/versions/node/v14.16.1/bin/node] 28: 0x1018a5c34 Builtins_InterpreterEntryTrampoline [/Users/eventtan/.nvm/versions/node/v14.16.1/bin/node] 29: 0x1018a5c34 Builtins_InterpreterEntryTrampoline [/Users/eventtan/.nvm/versions/node/v14.16.1/bin/node] 30: 0x1018a5c34 Builtins_InterpreterEntryTrampoline [/Users/eventtan/.nvm/versions/node/v14.16.1/bin/node] 31: 0x1018a5c34 Builtins_InterpreterEntryTrampoline [/Users/eventtan/.nvm/versions/node/v14.16.1/bin/node] 32: 0x1018a5c34 Builtins_InterpreterEntryTrampoline [/Users/eventtan/.nvm/versions/node/v14.16.1/bin/node] 33: 0x1018a5c34 Builtins_InterpreterEntryTrampoline [/Users/eventtan/.nvm/versions/node/v14.16.1/bin/node] 34: 0x1018a5c34 Builtins_InterpreterEntryTrampoline [/Users/eventtan/.nvm/versions/node/v14.16.1/bin/node] 35: 0x1018a5c34 Builtins_InterpreterEntryTrampoline [/Users/eventtan/.nvm/versions/node/v14.16.1/bin/node] 36: 0x1018a5c34 Builtins_InterpreterEntryTrampoline [/Users/eventtan/.nvm/versions/node/v14.16.1/bin/node] 37: 0x1018a5c34 Builtins_InterpreterEntryTrampoline [/Users/eventtan/.nvm/versions/node/v14.16.1/bin/node] 38: 0x1018a5c34 Builtins_InterpreterEntryTrampoline [/Users/eventtan/.nvm/versions/node/v14.16.1/bin/node] 39: 0x1018a5c34 Builtins_InterpreterEntryTrampoline [/Users/eventtan/.nvm/versions/node/v14.16.1/bin/node] 40: 0x1018a5c34 Builtins_InterpreterEntryTrampoline [/Users/eventtan/.nvm/versions/node/v14.16.1/bin/node] 41: 0x1018a5c34 Builtins_InterpreterEntryTrampoline [/Users/eventtan/.nvm/versions/node/v14.16.1/bin/node] 42: 0x1018a5c34 Builtins_InterpreterEntryTrampoline [/Users/eventtan/.nvm/versions/node/v14.16.1/bin/node] 43: 0x1018a5c34 Builtins_InterpreterEntryTrampoline [/Users/eventtan/.nvm/versions/node/v14.16.1/bin/node] 44: 0x1018a5c34 Builtins_InterpreterEntryTrampoline [/Users/eventtan/.nvm/versions/node/v14.16.1/bin/node] 45: 0x1018a5c34 Builtins_InterpreterEntryTrampoline [/Users/eventtan/.nvm/versions/node/v14.16.1/bin/node] 46: 0x1018a5c34 Builtins_InterpreterEntryTrampoline [/Users/eventtan/.nvm/versions/node/v14.16.1/bin/node] 47: 0x1018a5c34 Builtins_InterpreterEntryTrampoline [/Users/eventtan/.nvm/versions/node/v14.16.1/bin/node] 48: 0x1018a5c34 Builtins_InterpreterEntryTrampoline [/Users/eventtan/.nvm/versions/node/v14.16.1/bin/node] 49: 0x1018a5c34 Builtins_InterpreterEntryTrampoline [/Users/eventtan/.nvm/versions/node/v14.16.1/bin/node] 50: 0x1018a5c34 Builtins_InterpreterEntryTrampoline [/Users/eventtan/.nvm/versions/node/v14.16.1/bin/node] 51: 0x1018a5c34 Builtins_InterpreterEntryTrampoline [/Users/eventtan/.nvm/versions/node/v14.16.1/bin/node] 52: 0x1018a5c34 Builtins_InterpreterEntryTrampoline [/Users/eventtan/.nvm/versions/node/v14.16.1/bin/node] 53: 0x1018a5c34 Builtins_InterpreterEntryTrampoline [/Users/eventtan/.nvm/versions/node/v14.16.1/bin/node] 54: 0x1018d2b20 Builtins_AsyncFunctionAwaitResolveClosure [/Users/eventtan/.nvm/versions/node/v14.16.1/bin/node] 55: 0x10194dcbc Builtins_PromiseFulfillReactionJob [/Users/eventtan/.nvm/versions/node/v14.16.1/bin/node] 56: 0x1018c5e38 Builtins_RunMicrotasks [/Users/eventtan/.nvm/versions/node/v14.16.1/bin/node] 57: 0x1018a33c8 Builtins_JSRunMicrotasksEntry [/Users/eventtan/.nvm/versions/node/v14.16.1/bin/node] 58: 0x160008000 ` Hardware Overview:

Model Name: MacBook Air Model Identifier: MacBookAir10,1 Chip: Apple M1 Total Number of Cores: 8 (4 performance and 4 efficiency) Memory: 16 GB System Firmware Version: 6723.81.1 Serial Number (system): C02F21FDQ6LR Hardware UUID: 16E505E6-359C-5E05-A468-FB003119785B Provisioning UDID: 00008103-001930D42662001E Activation Lock Status: Enabled

Still getting same error i tried all way but getting above error. please help me on that. tried that flag also "env FAST_REFRESH=false"

eugene1g commented 3 years ago

@Harshadcse You are using Node v14 - the easiest way to make this work is to upgrade to a current release v16.

Harshadcse commented 3 years ago

@Harshadcse You are using Node v14 - the easiest way to make this work is to upgrade to a current release v16.

@eugene1g : Sure I will try with latest version of node and let you know,

natoh19 commented 3 years ago

@Harshadcse You are using Node v14 - the easiest way to make this work is to upgrade to a current release v16.

@eugene1g : Sure I will try with latest version of node and let you know,

@Harshadcse were you able to resolve this issue with the update? I'm running Node 12.22 and get this on my new M1 Mac.

pfdgithub commented 3 years ago

@Harshadcse您正在使用Node-完成v14此工作的最简单方法是升级到当前版本v16

@ eugene1g:当然,我会尝试使用最新版本的node并让您知道,

@Harshadcse您能够通过更新解决此问题吗?我正在运行Node 12.22,并在我的新M1 Mac上获得它。

node 14.17.0 fixed https://github.com/nodejs/node/blob/master/doc/changelogs/CHANGELOG_V14.md#other-notable-changes

huiminxu commented 3 years ago

node 14.17.0 ok

npx create-react-app

@Harshadcse您正在使用Node-完成v14此工作的最简单方法是升级到当前版本v16

@ eugene1g:当然,我会尝试使用最新版本的node并让您知道,

@Harshadcse您能够通过更新解决此问题吗?我正在运行Node 12.22,并在我的新M1 Mac上获得它。

node 14.17.0 fixed https://github.com/nodejs/node/blob/master/doc/changelogs/CHANGELOG_V14.md#other-notable-changes

very good ! it is ok !

stale[bot] commented 2 years ago

This issue has been automatically marked as stale because it has not had any recent activity. It will be closed in 5 days if no further activity occurs.

blackstoneblackstone commented 2 years ago

Somehow this is caused by react-refresh-webpack-plugin. If I disable it, the app works as expected for me env FAST_REFRESH=false npm start

good!

samid49 commented 1 year ago

(root㉿kali)-[~/AhMyth-Android-RAT/AhMyth-Server] └─# npm start

start npx electron ./app

[1212/174734.032768:FATAL:electron_main_delegate.cc(300)] Running as root without --no-sandbox is not supported. See https://crbug.com/638180. /root/AhMyth-Android-RAT/AhMyth-Server/node_modules/electron-nightly/dist/electron exited with signal SIGTRAP

note"" I use kali linux on vertual box and windows 10 sandbox and hyper v was activated any solutions jdk version 17.0.5 node version 18.12.1 npm vrsion 9.1.2

kilitary commented 1 year ago

0x10190cfcc

Unlink.