I cant Install node-red

hi
am update nodejs and npm
but node-red cant run
so am removed and installed againe
but nothing same issus

$ npm install -g --unsafe-perm node-red
npm WARN deprecated har-validator@5.1.5: this library is no longer supported
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.0: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated bcrypt@3.0.8: versions < v5.0.0 do not handle NUL in passwords properly
npm WARN deprecated bcrypt@3.0.6: versions < v5.0.0 do not handle NUL in passwords properly
npm WARN deprecated node-pre-gyp@0.12.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 updat
es in the future
npm WARN deprecated node-pre-gyp@0.14.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 updat
es in the future

94r4d0x@DESKTOP-9KR27E3 MINGW64 ~
$ node-red
(node:4212) [DEP0128] DeprecationWarning: Invalid 'main' field in 'C:\Users\94r4d0x\AppData\Roaming\npm\node_modules\node-red\node_modules\@node-red\editor-client\package.json' of './li
b/index.js'. Please either fix that or report it to the module author
(Use `node --trace-deprecation ...` to show where the warning was created)

For windows, since you are doing global -g install, try it from an elevated cmd prompt.

Right click cmd, run as administrator → npm install -g --unsafe-perm node-red

C:\Windows\System32>npm install -g --unsafe-perm node-red
node:internal/modules/cjs/loader:944
  throw err;
  ^

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

C:\Windows\System32>

something is wrong with your installation.

Re-install nodejs (I recommend V14 LTS) Node.js

nothing same probleme

what does where npm show?

Also,
Try deleting the npm folders...

  • C:\Users\94r4d0x\AppData\Roaming\npm-cache
  • C:\Users\94r4d0x\AppData\Roaming\npm\node_modules

then try again

worked but with error

$ node-red
(node:2744) [DEP0128] DeprecationWarning: Invalid 'main' field in 'C:\Users\94r4d0x\AppData\Roaming\npm\node_modules\node-red\node_modules\@node-red\edit
or-client\package.json' of './lib/index.js'. Please either fix that or report it to the module author
(Use `node --trace-deprecation ...` to show where the warning was created)
7 Jun 14:31:42 - [info]

Welcome to Node-RED
===================

7 Jun 14:31:42 - [info] Node-RED version: v1.3.5
7 Jun 14:31:42 - [info] Node.js  version: v16.3.0
7 Jun 14:31:42 - [info] Windows_NT 10.0.19043 x64 LE
7 Jun 14:31:44 - [info] Loading palette nodes
7 Jun 14:31:46 - [info] Settings file  : C:\Users\94r4d0x\.node-red\settings.js
7 Jun 14:31:46 - [info] Context store  : 'default' [module=memory]
7 Jun 14:31:46 - [info] User directory : \Users\94r4d0x\.node-red
7 Jun 14:31:46 - [warn] Projects disabled : editorTheme.projects.enabled=false
7 Jun 14:31:46 - [info] Flows file     : \Users\94r4d0x\.node-red\flows_DESKTOP-9KR27E3.json
7 Jun 14:31:46 - [info] Creating new flow file
7 Jun 14:31:46 - [warn]

---------------------------------------------------------------------
Your flow credentials file is encrypted using a system-generated key.

If the system-generated key is lost for any reason, your credentials
file will not be recoverable, you will have to delete it and re-enter
your credentials.

You should set your own key using the 'credentialSecret' option in
your settings file. Node-RED will then re-encrypt your credentials
file using your chosen key the next time you deploy a change.
---------------------------------------------------------------------

7 Jun 14:31:46 - [info] Starting flows
7 Jun 14:31:46 - [info] Started flows
7 Jun 14:31:46 - [info] Server now running at http://127.0.0.1:1880/

There is not error - only warning & that is probably because you used nodejs 16 instead of v14 like i suggested. However, it not an issue.

ok thanks

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