Node Version: node: v11.10.0 and npm: 6.7.0
Platform: Windows 10
Module: integer
Every time I attempt to install integer, I get the following error.
PS C:\Users\will_\OneDrive\Desktop\bot-test> npm i integer
> [email protected] install C:\Users\will_\OneDrive\Desktop\bot-test\node_modules\integer
> node-gyp rebuild
C:\Users\will_\OneDrive\Desktop\bot-test\node_modules\integer>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\2017\BuildTools\MSBuild\15.0\Bin\MSBuild.exe ENOENT
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:246:19)
gyp ERR! stack at onErrorNT (internal/child_process.js:427:16)
gyp ERR! stack at processTicksAndRejections (internal/process/next_tick.js:76:17)
gyp ERR! System Windows_NT 10.0.17134
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\will_\OneDrive\Desktop\bot-test\node_modules\integer
gyp ERR! node -v v11.10.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 [email protected] requires a peer of bufferutil@^3.0.3 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of erlpack@discordapp/erlpack but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of node-opus@^0.2.7 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of opusscript@^0.0.6 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of sodium@^2.0.3 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of libsodium-wrappers@^0.7.3 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of uws@^9.14.0 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] No repository field.
npm WARN [email protected] license should be a valid SPDX license expression
npm ERR! code ELIFECYCLE
npm ERR! errno 7
npm ERR! [email protected] install: `node-gyp rebuild`
npm ERR! Exit status 7
npm ERR!
npm ERR! Failed at the [email protected] install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\will_\AppData\Roaming\npm-cache\_logs\2019-02-28T07_57_21_798Z-debug.log
I looked up the error on google and got different results. I have tried different things from reinstalling Microsoft Visual Studio, to editing files in my registry. I have tried a bunch of things and asked for help on other forums as well. I just can not seem to figure this out on my own and would appreciate some.
Please uninstall node. js and use the Node v14. x. It will solve it automatically.
If your npm is broken: On Mac or Linux, reinstall npm. Windows: If you're on Windows and you have a broken installation, the easiest thing to do is to reinstall node from the official installer (see this note about installing the latest stable version).
node-gyp is a tool that enables the compilation of native add-on modules for Node in multiple platforms. It has widespread use and is included as a dependency in many NPM packages. On most systems, this isn't an issue, and installing node-gyp with the rest of your packages works as expected.
node-gyp dependencies If you only need to compile add-ons during the project setup, Node. js should cover it for you. However, if you are an add-on developer, you probably need to install node-gyp globally. To use node-gyp, first, we'll need to install a Python runtime, the make utility, and a C or C++ compiler.
I would suggest you to install the build tools for node. These will help you compile node-gyp packages and most likely fix your error. Simply start PowerShell as Administrator and run:
npm install --global windows-build-tools
Or, if you are using Yarn:
yarn global add windows-build-tools
NPM Package: windows-build-tools
You could also install
Python 2.7
andVisual C++ Build Tools
manually but windows-build-tools handles this all for you!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With