Greenstand / treetracker-wallet-app

The Greenstand Wallet App
https://wallet.treetracker.org
14 stars 43 forks source link

`npm start` failed #184

Closed dadiorchen closed 4 months ago

dadiorchen commented 2 years ago

On my macos, the top showing 2G+ memory consuming. image

And failed to run eventually:

Compiling...

<--- Last few GCs --->

[3262:0x7fcccee00000]   197085 ms: Scavenge 1994.4 (2086.6) -> 1990.1 (2086.6) MB, 9.2 / 0.0 ms  (average mu = 0
.375, current mu = 0.349) allocation failure
[3262:0x7fcccee00000]   197149 ms: Scavenge 1995.2 (2086.6) -> 1991.7 (2086.6) MB, 12.5 / 0.0 ms  (average mu =
0.375, current mu = 0.349) allocation failure
[3262:0x7fcccee00000]   197244 ms: Scavenge 1997.7 (2086.6) -> 1993.5 (2102.6) MB, 24.0 / 0.1 ms  (average mu =
0.375, current mu = 0.349) allocation failure

<--- JS stacktrace --->

FATAL ERROR: Reached heap limit Allocation failed - JavaScript heap out of memory
 1: 0x10b530545 node::Abort() (.cold.1) [/Users/deanchen/.nvm/versions/node/v16.11.1/bin/node]
 2: 0x10a231a49 node::Abort() [/Users/deanchen/.nvm/versions/node/v16.11.1/bin/node]
 3: 0x10a231bbf node::OnFatalError(char const*, char const*) [/Users/deanchen/.nvm/versions/node/v16.11.1/bin/no
de]
 4: 0x10a3b1387 v8::Utils::ReportOOMFailure(v8::internal::Isolate*, char const*, bool) [/Users/deanchen/.nvm/ver
sions/node/v16.11.1/bin/node]
 5: 0x10a3b1323 v8::internal::V8::FatalProcessOutOfMemory(v8::internal::Isolate*, char const*, bool) [/Users/dea
nchen/.nvm/versions/node/v16.11.1/bin/node]
 6: 0x10a552a35 v8::internal::Heap::FatalProcessOutOfMemory(char const*) [/Users/deanchen/.nvm/versions/node/v16
.11.1/bin/node]
 7: 0x10a5513bc v8::internal::Heap::CollectGarbage(v8::internal::AllocationSpace, v8::internal::GarbageCollectio
nReason, v8::GCCallbackFlags) [/Users/deanchen/.nvm/versions/node/v16.11.1/bin/node]
 8: 0x10a55dbb0 v8::internal::Heap::AllocateRawWithLightRetrySlowPath(int, v8::internal::AllocationType, v8::int
ernal::AllocationOrigin, v8::internal::AllocationAlignment) [/Users/deanchen/.nvm/versions/node/v16.11.1/bin/nod
e]
 9: 0x10a55dc31 v8::internal::Heap::AllocateRawWithRetryOrFailSlowPath(int, v8::internal::AllocationType, v8::in
ternal::AllocationOrigin, v8::internal::AllocationAlignment) [/Users/deanchen/.nvm/versions/node/v16.11.1/bin/no
de]
10: 0x10a52ad87 v8::internal::Factory::NewFillerObject(int, bool, v8::internal::AllocationType, v8::internal::Al
locationOrigin) [/Users/deanchen/.nvm/versions/node/v16.11.1/bin/node]
11: 0x10a8e055e v8::internal::Runtime_AllocateInYoungGeneration(int, unsigned long*, v8::internal::Isolate*) [/U
sers/deanchen/.nvm/versions/node/v16.11.1/bin/node]
12: 0x10ac89e99 Builtins_CEntry_Return1_DontSaveFPRegs_ArgvOnStack_NoBuiltinExit [/Users/deanchen/.nvm/versions/
node/v16.11.1/bin/node]
13: 0x10ace3364 Builtins_RegExpSplit [/Users/deanchen/.nvm/versions/node/v16.11.1/bin/node]
treetracker-wallet-web>

To reproduce the bug:

  1. remove the node_modules
  2. remove the package-lock.json
  3. run npm start

Some hints:

dadiorchen commented 2 years ago

And I failed to run it at last npm start:

Compiling...

<--- Last few GCs --->

[3262:0x7fcccee00000]   197085 ms: Scavenge 1994.4 (2086.6) -> 1990.1 (2086.6) MB, 9.2 / 0.0 ms  (average mu = 0
.375, current mu = 0.349) allocation failure
[3262:0x7fcccee00000]   197149 ms: Scavenge 1995.2 (2086.6) -> 1991.7 (2086.6) MB, 12.5 / 0.0 ms  (average mu =
0.375, current mu = 0.349) allocation failure
[3262:0x7fcccee00000]   197244 ms: Scavenge 1997.7 (2086.6) -> 1993.5 (2102.6) MB, 24.0 / 0.1 ms  (average mu =
0.375, current mu = 0.349) allocation failure

<--- JS stacktrace --->

FATAL ERROR: Reached heap limit Allocation failed - JavaScript heap out of memory
 1: 0x10b530545 node::Abort() (.cold.1) [/Users/deanchen/.nvm/versions/node/v16.11.1/bin/node]
 2: 0x10a231a49 node::Abort() [/Users/deanchen/.nvm/versions/node/v16.11.1/bin/node]
 3: 0x10a231bbf node::OnFatalError(char const*, char const*) [/Users/deanchen/.nvm/versions/node/v16.11.1/bin/no
de]
 4: 0x10a3b1387 v8::Utils::ReportOOMFailure(v8::internal::Isolate*, char const*, bool) [/Users/deanchen/.nvm/ver
sions/node/v16.11.1/bin/node]
 5: 0x10a3b1323 v8::internal::V8::FatalProcessOutOfMemory(v8::internal::Isolate*, char const*, bool) [/Users/dea
nchen/.nvm/versions/node/v16.11.1/bin/node]
 6: 0x10a552a35 v8::internal::Heap::FatalProcessOutOfMemory(char const*) [/Users/deanchen/.nvm/versions/node/v16
.11.1/bin/node]
 7: 0x10a5513bc v8::internal::Heap::CollectGarbage(v8::internal::AllocationSpace, v8::internal::GarbageCollectio
nReason, v8::GCCallbackFlags) [/Users/deanchen/.nvm/versions/node/v16.11.1/bin/node]
 8: 0x10a55dbb0 v8::internal::Heap::AllocateRawWithLightRetrySlowPath(int, v8::internal::AllocationType, v8::int
ernal::AllocationOrigin, v8::internal::AllocationAlignment) [/Users/deanchen/.nvm/versions/node/v16.11.1/bin/nod
e]
 9: 0x10a55dc31 v8::internal::Heap::AllocateRawWithRetryOrFailSlowPath(int, v8::internal::AllocationType, v8::in
ternal::AllocationOrigin, v8::internal::AllocationAlignment) [/Users/deanchen/.nvm/versions/node/v16.11.1/bin/no
de]
10: 0x10a52ad87 v8::internal::Factory::NewFillerObject(int, bool, v8::internal::AllocationType, v8::internal::Al
locationOrigin) [/Users/deanchen/.nvm/versions/node/v16.11.1/bin/node]
11: 0x10a8e055e v8::internal::Runtime_AllocateInYoungGeneration(int, unsigned long*, v8::internal::Isolate*) [/U
sers/deanchen/.nvm/versions/node/v16.11.1/bin/node]
12: 0x10ac89e99 Builtins_CEntry_Return1_DontSaveFPRegs_ArgvOnStack_NoBuiltinExit [/Users/deanchen/.nvm/versions/
node/v16.11.1/bin/node]
13: 0x10ace3364 Builtins_RegExpSplit [/Users/deanchen/.nvm/versions/node/v16.11.1/bin/node]
treetracker-wallet-web>
dadiorchen commented 2 years ago

@VWRoli you can run it right? I don't know why I failed, I just rebase ed my code to main

A things need to mention is that I have some problem with webpack:

Error: Cannot find module 'webpack'

So I need to delete the package-lock.json then I can install the modules successfully, after that, npm start failed.

VWRoli commented 2 years ago

I can run it yes, cloned the repo to another folder and it is working. I was not able to reproduce the problem you are having.