Zone allocation failed - trying to reinstall dashboard

Hi.
I think I've messed up my node-red modules.
Now I see node-red dashboard in the palette but I'm warned seevral module are missing.
I don't see it in node_modules.

When I manually install it I have this error
What can this be?

C:\Users\user\AppData\Roaming\npm>npm install node-red-dashboard
[#########.........] / reify:node-red-dashboard: sill audit bulk request {
<--- Last few GCs --->

[5624:000001EEEB777670]    67668 ms: Scavenge 33.0 (36.4) -> 31.8 (36.9) MB, 1.3 / 0.0 ms  (average mu = 0.997, current mu = 0.979) allocation failure;
[5624:000001EEEB777670]    67710 ms: Scavenge 33.4 (36.9) -> 32.1 (36.9) MB, 1.2 / 0.0 ms  (average mu = 0.997, current mu = 0.979) allocation failure;
[5624:000001EEEB777670]    67772 ms: Scavenge 33.9 (37.2) -> 32.8 (41.9) MB, 3.5 / 0.0 ms  (average mu = 0.997, current mu = 0.979) allocation failure;


<--- JS stacktrace --->

FATAL ERROR: Zone Allocation failed - process out of memory
 1: 00007FF71DAAACAF
 2: 00007FF71DA39286
 3: 00007FF71DA3A15D
 4: 00007FF71E4B8D2E
 5: 00007FF71E4A2EE2
 6: 00007FF71DFDB7B0
 7: 00007FF71E8DCE4F
 8: 00007FF71E8DCCBB
 9: 00007FF71E842BA2
10: 00007FF71E8C523F
11: 00007FF71E8C67A5
12: 00007FF71E429A8C
13: 00007FF71E429B50
14: 00007FF71E426FD5
15: 00007FF71E42474B
16: 00007FF71E426BF0
17: 00007FF71E423178
18: 00007FF71E04E57E
19: 00007FF71E558D31
20: 00007FF71E4DB540
21: 00007FF69E8FBE1D

now when I launch node-red I have this error.

C:\Users\user\AppData\Roaming\npm>node-red
node:internal/modules/cjs/loader:942
  throw err;
  ^

Error: Cannot find module 'C:\Users\user\AppData\Roaming\npm\node_modules\node-red\red.js'
←[90m    at Module._resolveFilename (node:internal/modules/cjs/loader:939:15)←[39m
←[90m    at Module._load (node:internal/modules/cjs/loader:780:27)←[39m
←[90m    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:77:12)←[39m
←[90m    at node:internal/main/run_main_module:17:47←[39m {
  code: ←[32m'MODULE_NOT_FOUND'←[39m,
  requireStack: []
}

Node.js v18.1.0```

Any help?

Thankfully, npm is great for this. You can simply delete ~/.node-red/node_modules:

From PowerShell (which recognises ~):

cd ~/.node-red
rmdir node_modules
npm install

If you still get the issue after that, then it it is your global installs that are the issue. so just reinstall node-red.

Thanks.
Apparently is not working.
This is my powershell run as admin
(sorry for part of the npm comment in italian..


PS C:\WINDOWS\system32> cd ~/.node-red
PS C:\Users\user\.node-red> ls


    Directory: C:\Users\user\.node-red


Mode                 LastWriteTime         Length Name
----                 -------------         ------ ----
d-----        10/13/2021   4:05 PM                lib
d-----         10/5/2022   9:26 PM                node_modules
-a----         10/4/2022   6:47 PM          63172 .config.nodes.json
-a----         10/4/2022   6:47 PM          63786 .config.nodes.json.backup
-a----         1/18/2022   1:58 AM            123 .config.runtime.json
-a----        10/13/2021   4:05 PM             95 .config.runtime.json.backup
-a----         10/5/2022   5:17 PM            699 .config.users.json
-a----          5/9/2022  12:43 PM            699 .config.users.json.backup
-a----         10/4/2022   6:51 PM         174784 .flows.json.backup
-a----         10/4/2022   6:51 PM           1907 .flows_cred.json.backup
-a----         10/4/2022   6:52 PM         149613 flows.json
-a----         10/4/2022   6:52 PM           1819 flows_cred.json
-a----         10/4/2022   6:48 PM        1664180 package-lock.json
-a----         10/4/2022   6:48 PM            755 package.json
-a----        10/13/2021   4:05 PM          20117 settings.js


PS C:\Users\user\.node-red> rmdir node_modules

Conferma
Per l'elemento in C:\Users\user\.node-red\node_modules sono disponibili elementi figlio e non è stato
specificato il parametro Recurse. Se si continua, insieme all'elemento verranno rimossi anche tutti gli elementi
figlio. Continuare?
[S] Sì  [T] Sì a tutti  [N] No  [U] No a tutti  [O] Sospendi  [?] Guida (il valore predefinito è "S"): T
PS C:\Users\user\.node-red> ls


    Directory: C:\Users\user\.node-red


Mode                 LastWriteTime         Length Name
----                 -------------         ------ ----
d-----        10/13/2021   4:05 PM                lib
-a----         10/4/2022   6:47 PM          63172 .config.nodes.json
-a----         10/4/2022   6:47 PM          63786 .config.nodes.json.backup
-a----         1/18/2022   1:58 AM            123 .config.runtime.json
-a----        10/13/2021   4:05 PM             95 .config.runtime.json.backup
-a----         10/5/2022   5:17 PM            699 .config.users.json
-a----          5/9/2022  12:43 PM            699 .config.users.json.backup
-a----         10/4/2022   6:51 PM         174784 .flows.json.backup
-a----         10/4/2022   6:51 PM           1907 .flows_cred.json.backup
-a----         10/4/2022   6:52 PM         149613 flows.json
-a----         10/4/2022   6:52 PM           1819 flows_cred.json
-a----         10/4/2022   6:48 PM        1664180 package-lock.json
-a----         10/4/2022   6:48 PM            755 package.json
-a----        10/13/2021   4:05 PM          20117 settings.js


PS C:\Users\user\.node-red> npm install
npm WARN deprecated source-map-url@0.4.1: See https://github.com/lydell/source-map-url#deprecated
npm WARN deprecated urix@0.1.0: Please see https://github.com/lydell/urix#deprecated
npm WARN deprecated har-validator@5.1.5: this library is no longer supported
npm WARN deprecated source-map-resolve@0.5.3: See https://github.com/lydell/source-map-resolve#deprecated
npm WARN deprecated chokidar@2.1.8: Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies.
npm WARN deprecated resolve-url@0.2.1: https://github.com/lydell/resolve-url#deprecated
npm WARN deprecated request-promise@4.2.6: request-promise has been deprecated because it extends the now deprecated request package, see https://github.com/request/request/issues/3142
npm WARN deprecated querystring@0.2.0: The querystring API is considered Legacy. new code should use the URLSearchParams API instead.
npm WARN tar TAR_ENTRY_ERROR UNKNOWN: unknown error, write
npm WARN tar TAR_ENTRY_ERROR UNKNOWN: unknown error, write
npm WARN tar TAR_ENTRY_ERROR UNKNOWN: unknown error, write
npm WARN tar TAR_ENTRY_ERROR EBADF: bad file descriptor, write
npm WARN tar TAR_ENTRY_ERROR EBADF: bad file descriptor, write
npm WARN tar TAR_ENTRY_ERROR EBADF: bad file descriptor, write
npm WARN tar TAR_ENTRY_ERROR EBADF: bad file descriptor, write
npm WARN tar TAR_ENTRY_ERROR EBADF: bad file descriptor, write
npm WARN tar TAR_ENTRY_ERROR EBADF: bad file descriptor, write
npm WARN tar TAR_ENTRY_ERROR EBADF: bad file descriptor, write
npm WARN tar TAR_ENTRY_ERROR EBADF: bad file descriptor, close
npm WARN tar TAR_ENTRY_ERROR EBADF: bad file descriptor, write
npm WARN deprecated deep-defaults@1.0.5: not actively maintained; find alternatives
npm WARN tar TAR_ENTRY_ERROR EBADF: bad file descriptor, write
npm WARN deprecated sntp@0.2.4: This module moved to @hapi/sntp. Please make sure to switch over as this distribution is no longer supported and may contain bugs and critical security issues.
npm WARN tar TAR_ENTRY_ERROR EBADF: bad file descriptor, write
npm WARN tar TAR_ENTRY_ERROR EBADF: bad file descriptor, write
npm WARN deprecated uuid@3.4.0: Please upgrade  to version 7 or higher.  Older versions may use Math.random() in certain circumstances, which is known to be problematic.  See https://v8.dev/blog/math-random for details.
npm WARN deprecated cryptiles@0.2.2: This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial).
npm WARN deprecated uuid@3.4.0: Please upgrade  to version 7 or higher.  Older versions may use Math.random() in certain circumstances, which is known to be problematic.  See https://v8.dev/blog/math-random for details.
npm WARN deprecated uuid@3.4.0: Please upgrade  to version 7 or higher.  Older versions may use Math.random() in certain circumstances, which is known to be problematic.  See https://v8.dev/blog/math-random for details.
npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated hoek@0.9.1: This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial).
npm WARN deprecated boom@0.4.2: This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial).
npm WARN deprecated node-pre-gyp@0.11.0: Please upgrade to @mapbox/node-pre-gyp: the non-scoped node-pre-gyp package is deprecated and only the @mapbox scoped package will recieve updates in the future
npm WARN deprecated request@2.40.0: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated hawk@1.1.1: This module moved to @hapi/hawk. Please make sure to switch over as this distribution is no longer supported and may contain bugs and critical security issues.
npm WARN deprecated node-uuid@1.4.8: Use uuid module instead
npm WARN deprecated tar@2.2.2: This version of tar is no longer supported, and will not receive security updates. Please upgrade asap.
npm WARN deprecated core-js@2.6.12: core-js@<3.4 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Please, upgrade your dependencies to the actual version of core-js.
npm WARN deprecated core-js@2.6.12: core-js@<3.4 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Please, upgrade your dependencies to the actual version of core-js.
npm WARN deprecated core-js@2.6.12: core-js@<3.4 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Please, upgrade your dependencies to the actual version of core-js.
npm ERR! code EBADF
npm ERR! syscall write
npm ERR! errno -4083
npm ERR! EBADF: bad file descriptor, write

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\usera\AppData\Local\npm-cache\_logs\2022-10-05T19_31_15_645Z-debug-0.log

[details="Summary"]
PS C:\Users\user\.node-red> node-red
node:internal/modules/cjs/loader:942
  throw err;
  ^

Error: Cannot find module 'C:\Users\user\AppData\Roaming\npm\node_modules\node-red\red.js'
←[90m    at Module._resolveFilename (node:internal/modules/cjs/loader:939:15)←[39m
←[90m    at Module._load (node:internal/modules/cjs/loader:780:27)←[39m
←[90m    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:77:12)←[39m
←[90m    at node:internal/main/run_main_module:17:47←[39m {
  code: ←[32m'MODULE_NOT_FOUND'←[39m,
  requireStack: []
}
[/details]


Node.js v18.1.0
PS C:\Users\user\.node-red>

Is your disc full, or nearly full?

good point.

not anymore, since 2 days ago.

how do I tell to npm?

Not sure, maybe try to force clean the cache with npm cache clean --force then do npm install again.

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.