# Cant re-install the midi module

**URL:** <https://discourse.nodered.org/t/cant-re-install-the-midi-module/84340>\
**Category:** General\
**Tags:** module\
**Created:** [6 January 2024 16:49 UTC](https://discourse.nodered.org/t/cant-re-install-the-midi-module/84340 "2024-01-06T16:49:07Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![AmirGhorbani](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/amirghorbani/32/87044_2.png) [@AmirGhorbani](https://discourse.nodered.org/u/AmirGhorbani)\
**Post date:** [6 January 2024 16:49 UTC](https://discourse.nodered.org/t/cant-re-install-the-midi-module/84340/1 "2024-01-06T16:49:07Z")

</div>

hello i was use the node red midi for send and receive the midi message before but now i cant install the mid module 🙂  
i dont know what is actually module :  
1- [node-red-contrib-midi-windows (node) - Node-RED](https://flows.nodered.org/node/node-red-contrib-midi-windows)  
2 - [node-red-contrib-midi (node) - Node-RED](https://flows.nodered.org/node/node-red-contrib-midi)

Microsoft Windows [Version 10.0.19045.3693]  
(c) Microsoft Corporation. All rights reserved.

C:\Users\AmirGhorbani\>npm install node-red-contrib-midi

added 5 packages, and audited 326 packages in 13s

46 packages are looking for funding  
run `npm fund` for details

5 vulnerabilities (2 moderate, 3 high)

To address all issues (including breaking changes), run:  
npm audit fix --force

Run `npm audit` for details.

C:\Users\AmirGhorbani\>npm audit

# npm audit report

got \<=11.8.3  
Severity: high  
Got allows a redirect to a UNIX socket -  
Depends on vulnerable versions of cacheable-request  
fix available via `npm audit fix --force`  
Will install nexe@1.1.6, which is a breaking change  
node\_modules/download/node\_modules/got  
download \>=4.0.0  
Depends on vulnerable versions of got  
node\_modules/download  
nexe \>=2.0.0-beta.1  
Depends on vulnerable versions of download  
node\_modules/nexe

http-cache-semantics \<4.1.1  
Severity: high  
http-cache-semantics vulnerable to Regular Expression Denial of Service -  
fix available via `npm audit fix --force`  
Will install nexe@1.1.6, which is a breaking change  
node\_modules/download/node\_modules/http-cache-semantics  
cacheable-request 0.1.0 - 2.1.4  
Depends on vulnerable versions of http-cache-semantics  
node\_modules/download/node\_modules/cacheable-request

5 vulnerabilities (2 moderate, 3 high)

To address all issues (including breaking changes), run:  
npm audit fix --force

C:\Users\AmirGhorbani\>npm audit fix --force  
npm WARN using --force Recommended protections disabled.  
npm WARN audit Updating nexe to 1.1.6, which is a SemVer major change.  
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 math-random for details.  
npm WARN deprecated request@2.88.2: request has been deprecated, see

added 219 packages, removed 168 packages, changed 10 packages, and audited 377 packages in 24s

39 packages are looking for funding  
run `npm fund` for details

# npm audit report

request \*  
Severity: moderate  
Server-Side Request Forgery in Request -  
Depends on vulnerable versions of tough-cookie  
fix available via `npm audit fix --force`  
Will install nexe@4.0.0-rc.4, which is a breaking change  
node\_modules/request  
nexe 0.1.0 - 1.1.6  
Depends on vulnerable versions of request  
Depends on vulnerable versions of yargs  
node\_modules/nexe

tough-cookie \<4.1.3  
Severity: moderate  
tough-cookie Prototype Pollution vulnerability -  
fix available via `npm audit fix --force`  
Will install nexe@4.0.0-rc.4, which is a breaking change  
node\_modules/tough-cookie

yargs-parser \<=5.0.0  
Severity: moderate  
yargs-parser Vulnerable to Prototype Pollution -  
fix available via `npm audit fix --force`  
Will install nexe@4.0.0-rc.4, which is a breaking change  
node\_modules/yargs-parser  
yargs 4.0.0-alpha1 - 7.0.0-alpha.3 || 7.1.1  
Depends on vulnerable versions of yargs-parser  
node\_modules/yargs

5 moderate severity vulnerabilities

To address all issues (including breaking changes), run:  
npm audit fix --force

C:\Users\AmirGhorbani\>

---

<div class="post-metadata">

**Author:** ![marcus-j-davies](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/marcus-j-davies/32/103435_2.png) [@marcus-j-davies](https://discourse.nodered.org/u/marcus-j-davies)\
**Post date:** [6 January 2024 16:56 UTC](https://discourse.nodered.org/t/cant-re-install-the-midi-module/84340/2 "2024-01-06T16:56:49Z")

</div>

Welcome to forums @AmirGhorbani

You are not running the command in the right place for starters.  
any reason you're not installing them from within the Node RED pallete manager?

if doing it via command prompt, you need to `cd` into `C:\Users\AmirGhorbani\.node-red`

and run the commands from there, and then restart Node RED

---

<div class="post-metadata">

**Author:** ![AmirGhorbani](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/amirghorbani/32/87044_2.png) [@AmirGhorbani](https://discourse.nodered.org/u/AmirGhorbani)\
**Post date:** [6 January 2024 16:58 UTC](https://discourse.nodered.org/t/cant-re-install-the-midi-module/84340/3 "2024-01-06T16:58:34Z")

</div>

have same issue when i want to install from node red pallete manage

---

<div class="post-metadata">

**Author:** ![AmirGhorbani](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/amirghorbani/32/87044_2.png) [@AmirGhorbani](https://discourse.nodered.org/u/AmirGhorbani)\
**Post date:** [6 January 2024 17:04 UTC](https://discourse.nodered.org/t/cant-re-install-the-midi-module/84340/4 "2024-01-06T17:04:48Z")

</div>

when i want to install from pallete manager i have a big text log  
the latest line in log is:

```auto
79 error gyp ERR! build error 
79 error gyp ERR! stack Error: `C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\MSBuild\15.0\Bin\MSBuild.exe` failed with exit code: 1
79 error gyp ERR! stack at ChildProcess.<anonymous> (C:\Users\AmirGhorbani\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\build.js:209:23)
79 error gyp ERR! stack at ChildProcess.emit (node:events:514:28)
79 error gyp ERR! stack at ChildProcess._handle.onexit (node:internal/child_process:294:12)
79 error gyp ERR! System Windows_NT 10.0.19045
79 error gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\AmirGhorbani\\AppData\\Roaming\\npm\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
79 error gyp ERR! cwd C:\Users\AmirGhorbani\.node-red\node_modules\midi
79 error gyp ERR! node -v v20.10.0
79 error gyp ERR! node-gyp -v v10.0.1
79 error gyp ERR! not ok
80 verbose exit 1
``'
```

---

<div class="post-metadata">

**Author:** ![marcus-j-davies](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/marcus-j-davies/32/103435_2.png) [@marcus-j-davies](https://discourse.nodered.org/u/marcus-j-davies)\
**Post date:** [6 January 2024 17:08 UTC](https://discourse.nodered.org/t/cant-re-install-the-midi-module/84340/5 "2024-01-06T17:08:10Z")

</div>

If you have what is required installed (Visual Studio), you will need to raise this with the Author.

---

<div class="post-metadata">

**Author:** ![AmirGhorbani](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/amirghorbani/32/87044_2.png) [@AmirGhorbani](https://discourse.nodered.org/u/AmirGhorbani)\
**Post date:** [6 January 2024 17:14 UTC](https://discourse.nodered.org/t/cant-re-install-the-midi-module/84340/6 "2024-01-06T17:14:28Z")

</div>

i think its same error like serial port installation

```auto
6 Jan 20:40:46 - [info] Installing module: node-red-node-serialport, version: 2.0.2
6 Jan 20:41:29 - [warn] Installation of module node-red-node-serialport failed:
6 Jan 20:41:29 - [warn] ------------------------------------------
6 Jan 20:41:29 - [warn] npm WARN config production Use `--omit=dev` instead.
npm WARN deprecated @serialport/binding-abstract@9.2.4: This package has been renamed to @serialport/bindings-interface
npm WARN deprecated @serialport/bindings@9.2.9: This package has been renamed to @serialport/bindings-cpp.
npm WARN cleanup Failed to remove some directories [
npm WARN cleanup [
npm WARN cleanup 'C:\\Users\\AmirGhorbani\\.node-red\\node_modules\\@serialport',
npm WARN cleanup [Error: EPERM: operation not permitted, rmdir 'C:\Users\AmirGhorbani\.node-red\node_modules\@serialport\bindings\node_modules'] {
npm WARN cleanup errno: -4048,
npm WARN cleanup code: 'EPERM',
npm WARN cleanup syscall: 'rmdir',
npm WARN cleanup path: 'C:\\Users\\AmirGhorbani\\.node-red\\node_modules\\@serialport\\bindings\\node_modules'
npm WARN cleanup }
npm WARN cleanup ]
npm WARN cleanup ]
npm ERR! code 1
npm ERR! path C:\Users\AmirGhorbani\.node-red\node_modules\@serialport\bindings
npm ERR! command failed
npm ERR! command C:\Windows\system32\cmd.exe /d /s /c prebuild-install --tag-prefix @serialport/bindings@ || node-gyp rebuild
npm ERR! Building the projects in this solution one at a time. To enable parallel build, please add the "/m" switch.
npm ERR! serialport.cpp
npm ERR! c:\users\amirghorbani\.node-red\node_modules\nan\nan_callbacks.h(55): error C2039: 'AccessorSignature': is not a member of 'v8' [C:\Users\AmirGhorbani\.node-red\node_modules\@serialport\bindings\build\bindings.vcxproj]
npm ERR! c:\users\amirghorbani\appdata\local\node-gyp\cache\20.10.0\include\node\v8.h(71): note: see declaration of 'v8'
npm ERR! c:\users\amirghorbani\.node-red\node_modules\nan\nan_callbacks.h(55): error C2065: 'AccessorSignature': undeclared identifier [C:\Users\AmirGhorbani\.node-red\node_modules\@serialport\bindings\build\bindings.vcxproj]
npm ERR! c:\users\amirghorbani\.node-red\node_modules\nan\nan_callbacks.h(55): error C2923: 'v8::Local': 'AccessorSignature' is not a valid template type argument for parameter 'T' [C:\Users\AmirGhorbani\.node-red\node_modules\@serialport\bindings\build\bindings.vcxproj]
npm ERR! c:\users\amirghorbani\.node-red\node_modules\nan\nan_callbacks.h(55): error C2641: cannot deduce template argument for 'v8::Local' [C:\Users\AmirGhorbani\.node-red\node_modules\@serialport\bindings\build\bindings.vcxproj]
npm ERR! c:\users\amirghorbani\.node-red\node_modules\nan\nan.h(684): warning C4996: 'v8::Isolate::IdleNotificationDeadline': Use MemoryPressureNotification() to influence the GC schedule. [C:\Users\AmirGhorbani\.node-red\node_modules\@serialport\bindings\build\bindings.vcxproj]
npm ERR! c:\users\amirghorbani\appdata\local\node-gyp\cache\20.10.0\include\node\v8-isolate.h(1293): note: see declaration of 'v8::Isolate::IdleNotificationDeadline'
npm ERR! c:\users\amirghorbani\.node-red\node_modules\nan\nan.h(2518): error C2955: 'v8::Local': use of class template requires template argument list [C:\Users\AmirGhorbani\.node-red\node_modules\@serialport\bindings\build\bindings.vcxproj]
npm ERR! c:\users\amirghorbani\appdata\local\node-gyp\cache\20.10.0\include\node\v8-local-handle.h(190): note: see declaration of 'v8::Local'
npm ERR! c:\users\amirghorbani\.node-red\node_modules\nan\nan.h(2518): error C2672: 'v8::Local': no matching overloaded function found [C:\Users\AmirGhorbani\.node-red\node_modules\@serialport\bindings\build\bindings.vcxproj]
npm ERR! c:\users\amirghorbani\.node-red\node_modules\nan\nan.h(2518): error C2783: 'v8::Local<T> v8::Local(void)': could not deduce template argument for 'T' [C:\Users\AmirGhorbani\.node-red\node_modules\@serialport\bindings\build\bindings.vcxproj]
npm ERR! c:\users\amirghorbani\appdata\local\node-gyp\cache\20.10.0\include\node\v8-local-handle.h(192): note: see declaration of 'v8::Local'
npm ERR! c:\users\amirghorbani\.node-red\node_modules\nan\nan.h(2518): error C2780: 'v8::Local<T> v8::Local(v8::Local<S>)': expects 1 arguments - 0 provided [C:\Users\AmirGhorbani\.node-red\node_modules\@serialport\bindings\build\bindings.vcxproj]
npm ERR! c:\users\amirghorbani\appdata\local\node-gyp\cache\20.10.0\include\node\v8-local-handle.h(195): note: see declaration of 'v8::Local'
npm ERR! c:\users\amirghorbani\.node-red\node_modules\nan\nan.h(2518): error C2780: 'v8::Local<T> v8::Local(T *)': expects 1 arguments - 0 provided [C:\Users\AmirGhorbani\.node-red\node_modules\@serialport\bindings\build\bindings.vcxproj]
npm ERR! c:\users\amirghorbani\appdata\local\node-gyp\cache\20.10.0\include\node\v8-local-handle.h(331): note: see declaration of 'v8::Local'
npm ERR! c:\users\amirghorbani\.node-red\node_modules\nan\nan.h(2518): error C2641: cannot deduce template argument for 'v8::Local' [C:\Users\AmirGhorbani\.node-red\node_modules\@serialport\bindings\build\bindings.vcxproj]
npm ERR! c:\users\amirghorbani\.node-red\node_modules\nan\nan.h(2518): error C2512: 'v8::Local': no appropriate default constructor available [C:\Users\AmirGhorbani\.node-red\node_modules\@serialport\bindings\build\bindings.vcxproj]
npm ERR! c:\users\amirghorbani\.node-red\node_modules\nan\nan.h(2518): note: No constructor could take the source type, or constructor overload resolution was ambiguous
npm ERR! c:\users\amirghorbani\.node-red\node_modules\nan\nan.h(2544): error C2664: 'void v8::ObjectTemplate::SetAccessor(v8::Local<v8::Name>,v8::AccessorNameGetterCallback,v8::AccessorNameSetterCallback,v8::Local<v8::Value>,v8::AccessControl,v8::PropertyAttribute,v8::SideEffectType,v8::SideEffectType)': cannot convert argument 2 from 'Nan::imp::NativeGetter' to 'v8::AccessorGetterCallback' [C:\Users\AmirGhorbani\.node-red\node_modules\@serialport\bindings\build\bindings.vcxproj]
npm ERR! c:\users\amirghorbani\.node-red\node_modules\nan\nan.h(2551): note: This conversion requires a reinterpret_cast, a C-style cast or function-style cast
npm ERR! prebuild-install WARN install No prebuilt binaries found (target=20.10.0 runtime=node arch=x64 libc= platform=win32)
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using node-gyp@10.0.1
npm ERR! gyp info using node@20.10.0 | win32 | x64
npm ERR! gyp info find Python using Python version 3.12.1 found at "C:\Python312\python.exe"
npm ERR! gyp info find VS using VS2017 (15.9.33027.88) found at:
npm ERR! gyp info find VS "C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools"
npm ERR! gyp info find VS run with --verbose for detailed information
npm ERR! gyp info spawn C:\Python312\python.exe
npm ERR! gyp info spawn args [
npm ERR! gyp info spawn args 'C:\\Users\\AmirGhorbani\\AppData\\Roaming\\npm\\node_modules\\npm\\node_modules\\node-gyp\\gyp\\gyp_main.py',
npm ERR! gyp info spawn args 'binding.gyp',
npm ERR! gyp info spawn args '-f',
npm ERR! gyp info spawn args 'msvs',
npm ERR! gyp info spawn args '-I',
npm ERR! gyp info spawn args 'C:\\Users\\AmirGhorbani\\.node-red\\node_modules\\@serialport\\bindings\\build\\config.gypi',
npm ERR! gyp info spawn args '-I',
npm ERR! gyp info spawn args 'C:\\Users\\AmirGhorbani\\AppData\\Roaming\\npm\\node_modules\\npm\\node_modules\\node-gyp\\addon.gypi',
npm ERR! gyp info spawn args '-I',
npm ERR! gyp info spawn args 'C:\\Users\\AmirGhorbani\\AppData\\Local\\node-gyp\\Cache\\20.10.0\\include\\node\\common.gypi',
npm ERR! gyp info spawn args '-Dlibrary=shared_library',
npm ERR! gyp info spawn args '-Dvisibility=default',
npm ERR! gyp info spawn args '-Dnode_root_dir=C:\\Users\\AmirGhorbani\\AppData\\Local\\node-gyp\\Cache\\20.10.0',
npm ERR! gyp info spawn args '-Dnode_gyp_dir=C:\\Users\\AmirGhorbani\\AppData\\Roaming\\npm\\node_modules\\npm\\node_modules\\node-gyp',
npm ERR! gyp info spawn args '-Dnode_lib_file=C:\\\\Users\\\\AmirGhorbani\\\\AppData\\\\Local\\\\node-gyp\\\\Cache\\\\20.10.0\\\\<(target_arch)\\\\node.lib',
npm ERR! gyp info spawn args '-Dmodule_root_dir=C:\\Users\\AmirGhorbani\\.node-red\\node_modules\\@serialport\\bindings',
npm ERR! gyp info spawn args '-Dnode_engine=v8',
npm ERR! gyp info spawn args '--depth=.',
npm ERR! gyp info spawn args '--no-parallel',
npm ERR! gyp info spawn args '--generator-output',
npm ERR! gyp info spawn args 'C:\\Users\\AmirGhorbani\\.node-red\\node_modules\\@serialport\\bindings\\build',
npm ERR! gyp info spawn args '-Goutput_dir=.'
npm ERR! gyp info spawn args ]
npm ERR! gyp info spawn C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\MSBuild\15.0\Bin\MSBuild.exe
npm ERR! gyp info spawn args [
npm ERR! gyp info spawn args 'build\\binding.sln',
npm ERR! gyp info spawn args '/clp:Verbosity=minimal',
npm ERR! gyp info spawn args '/nologo',
npm ERR! gyp info spawn args '/p:Configuration=Release;Platform=x64'
npm ERR! gyp info spawn args ]
npm ERR! gyp ERR! build error
npm ERR! gyp ERR! stack Error: `C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\MSBuild\15.0\Bin\MSBuild.exe` failed with exit code: 1
npm ERR! gyp ERR! stack at ChildProcess.<anonymous> (C:\Users\AmirGhorbani\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\build.js:209:23)
npm ERR! gyp ERR! stack at ChildProcess.emit (node:events:514:28)
npm ERR! gyp ERR! stack at ChildProcess._handle.onexit (node:internal/child_process:294:12)
npm ERR! gyp ERR! System Windows_NT 10.0.19045
npm ERR! gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\AmirGhorbani\\AppData\\Roaming\\npm\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
npm ERR! gyp ERR! cwd C:\Users\AmirGhorbani\.node-red\node_modules\@serialport\bindings
npm ERR! gyp ERR! node -v v20.10.0
npm ERR! gyp ERR! node-gyp -v v10.0.1
npm ERR! gyp ERR! not ok

npm ERR! A complete log of this run can be found in: C:\Users\AmirGhorbani\AppData\Local\npm-cache\_logs\2024-01-06T17_10_47_108Z-debug-0.log

6 Jan 20:41:29 - [warn] ------------------------------------------
Error: Install failed
    at C:\Users\AmirGhorbani\AppData\Roaming\npm\node_modules\node-red\node_modules\@node-red\registry\lib\installer.js:285:25
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
6 Jan 20:41:29 - [error] Error: Install failed

```

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [6 January 2024 20:35 UTC](https://discourse.nodered.org/t/cant-re-install-the-midi-module/84340/7 "2024-01-06T20:35:15Z")

</div>

> [@AmirGhorbani](#):
>
> npm audit fix --force

Don't do this, you can end up with incompatible versions of modules. Luckily you did it from the wrong folder (it should have been run in C:/Users/AmirGhorbani/.node-red) so it won't have done any harm.

---

<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:** [6 March 2024 20:36 UTC](https://discourse.nodered.org/t/cant-re-install-the-midi-module/84340/8 "2024-03-06T20:36:04Z")

</div>

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