# I cant Install node-red

**URL:** <https://discourse.nodered.org/t/i-cant-install-node-red/46808>\
**Category:** General\
**Created:** [7 June 2021 12:23 UTC](https://discourse.nodered.org/t/i-cant-install-node-red/46808 "2021-06-07T12:23:40Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![d0d04m3](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/d0d04m3/32/19965_2.png) [@d0d04m3](https://discourse.nodered.org/u/d0d04m3)\
**Post date:** [7 June 2021 12:23 UTC](https://discourse.nodered.org/t/i-cant-install-node-red/46808/1 "2021-06-07T12:23:40Z")

</div>

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

```auto
$ 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)

```

---

<div class="post-metadata">

**Author:** ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)\
**Post date:** [7 June 2021 12:26 UTC](https://discourse.nodered.org/t/i-cant-install-node-red/46808/2 "2021-06-07T12:26:16Z")

</div>

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`

---

<div class="post-metadata">

**Author:** ![d0d04m3](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/d0d04m3/32/19965_2.png) [@d0d04m3](https://discourse.nodered.org/u/d0d04m3)\
**Post date:** [7 June 2021 12:29 UTC](https://discourse.nodered.org/t/i-cant-install-node-red/46808/3 "2021-06-07T12:29:27Z")

</div>

```auto
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>

```

---

<div class="post-metadata">

**Author:** ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)\
**Post date:** [7 June 2021 12:32 UTC](https://discourse.nodered.org/t/i-cant-install-node-red/46808/4 "2021-06-07T12:32:48Z")

</div>

something is wrong with your installation.

Re-install nodejs (I recommend V14 LTS) [Node.js](https://nodejs.org/en/)

---

<div class="post-metadata">

**Author:** ![d0d04m3](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/d0d04m3/32/19965_2.png) [@d0d04m3](https://discourse.nodered.org/u/d0d04m3)\
**Post date:** [7 June 2021 12:44 UTC](https://discourse.nodered.org/t/i-cant-install-node-red/46808/5 "2021-06-07T12:44:01Z")

</div>

nothing same probleme

---

<div class="post-metadata">

**Author:** ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)\
**Post date:** [7 June 2021 12:49 UTC](https://discourse.nodered.org/t/i-cant-install-node-red/46808/6 "2021-06-07T12:49:19Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![d0d04m3](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/d0d04m3/32/19965_2.png) [@d0d04m3](https://discourse.nodered.org/u/d0d04m3)\
**Post date:** [7 June 2021 13:32 UTC](https://discourse.nodered.org/t/i-cant-install-node-red/46808/7 "2021-06-07T13:32:18Z")

</div>

worked but with error

```auto
$ 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/

```

---

<div class="post-metadata">

**Author:** ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)\
**Post date:** [7 June 2021 13:40 UTC](https://discourse.nodered.org/t/i-cant-install-node-red/46808/8 "2021-06-07T13:40:41Z")

</div>

> [@d0d04m3](#):
>
> but with error

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.

---

<div class="post-metadata">

**Author:** ![d0d04m3](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/d0d04m3/32/19965_2.png) [@d0d04m3](https://discourse.nodered.org/u/d0d04m3)\
**Post date:** [7 June 2021 13:46 UTC](https://discourse.nodered.org/t/i-cant-install-node-red/46808/9 "2021-06-07T13:46:12Z")

</div>

ok thanks

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [21 June 2021 13:46 UTC](https://discourse.nodered.org/t/i-cant-install-node-red/46808/10 "2021-06-21T13:46:53Z")

</div>

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