Cannot install module please help

Hi there, I'm new to nodered and was just starting out, I am trying to use NodeRed to receive data from a ESP8266 connected to a QMC5883L (Magnetic compass sensor).

I am unsure of what issue but when I tried to run " npm install --save nodejs-qmc5883l " I will get and error. Any help or suggestions would be greatly appreciated. Thank you in advance.

npm install --save nodejs-qmc5883l
npm WARN read-shrinkwrap This version of npm is compatible with lockfileVersion@1, but package-lock.json was generated for lockfileVersion@2. I'll try to do my best with it!

> nodejs-qmc5883l@2.0.0 install C:\Users\Josia\node_modules\nodejs-qmc5883l
> node-gyp rebuild


C:\Users\Josia\node_modules\nodejs-qmc5883l>if not defined npm_config_node_gyp (node "C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild )  else (node "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" rebuild )
gyp ERR! UNCAUGHT EXCEPTION
gyp ERR! stack Error: spawn C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\MSBuild\15.0\Bin\MSBuild.exe ENOENT
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:249:19)
gyp ERR! stack     at onErrorNT (internal/child_process.js:442:16)
gyp ERR! stack     at processTicksAndRejections (internal/process/task_queues.js:84:9)
gyp ERR! System Windows_NT 10.0.19043
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd C:\Users\Josia\node_modules\nodejs-qmc5883l
gyp ERR! node -v v12.2.0
gyp ERR! node-gyp -v v3.8.0
gyp ERR! This is a bug in `node-gyp`.
gyp ERR! Try to update node-gyp and file an Issue if it does not help:
gyp ERR!     <https://github.com/nodejs/node-gyp/issues>
npm WARN ws@8.2.3 requires a peer of bufferutil@^4.0.1 but none is installed. You must install peer dependencies yourself.
npm WARN ws@8.2.3 requires a peer of utf-8-validate@^5.0.2 but none is installed. You must install peer dependencies yourself.
npm WARN Josia No description
npm WARN Josia No repository field.
npm WARN Josia No license field.

npm ERR! code ELIFECYCLE
npm ERR! errno 7
npm ERR! nodejs-qmc5883l@2.0.0 install: `node-gyp rebuild`
npm ERR! Exit status 7
npm ERR!
npm ERR! Failed at the nodejs-qmc5883l@2.0.0 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

node --version && npm --version
v12.2.0
6.9.0

You are installing a "normal" node package, this is not related to node-red. If it is related to node-red, i believe you are installing it in the wrong directory.

Did you follow the output instructions ?

gyp ERR! This is a bug in `node-gyp`.
gyp ERR! Try to update node-gyp and file an Issue if it does not help:
gyp ERR!     <https://github.com/nodejs/node-gyp/issues>

Did you install the windows build tools as described in the node red docs for running on windows?

Ah, okay. So I might not even need to use this module at all ? (I already have a microcontroller (ESP32/8266) that can run the sensor) and all I want is to be able to send those information collected by the sensor to Node Red to be used there.
Also, I tried installing 'npm install node-red-node-arduino' and it gave me
npm ERR! gyp ERR! find VS You need to install the latest version of Visual Studio npm ERR! gyp ERR! find VS including the "Desktop development with C++" workload. npm ERR! gyp ERR! find VS For more information consult the documentation at: npm ERR! gyp ERR! find VS https://github.com/nodejs/node-gyp#on-windows

which I already have

I ran it and tried installing the module again but to no avail


I tried installing Windows build tools multiple times (uninstalling and reinstalling/installing different version), but it will give me similar errors

This was one of the other errors I got (which I already have) am I missing something really obvious or is all this really confusing for beginners hahaha ?

Use an mqtt server and in the arduino code send the output to mqtt.
In node-red read the mqtt data. Some random tutorial.

Did you install using the procedure described in the docs?

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