I want to install some dependencies and in this case installing node-pty. But when I run it they give me this error:
Error: The module '/home/dev/Documents/project/node_web_kit/node_modules/node-pty/build/Release/pty.node' was compiled against a different Node.js version using NODE_MODULE_VERSION 46. This version of Node.js requires NODE_MODULE_VERSION 51. Please try re-compiling or re-installing
any solutions?
Multiple Node JS Versions with NVM. NVM (Node Version Manager) can also be used to manage multiple NodeJS versions at the same time. You can install setup NVM in your machine by running the following commands.
Switching among Node. 7; we can simply run either nvm use 12.22. 7 or nvm use 16.13. 0 to easily switch into either version we need. Note that since we only have one version that begins with 12, 14, or 16, we can switch versions with a simple nvm use 16 , nvm use 14 , or nvm use 12 command.
Node. js and NPM versions aren't directly connected, otherwise they would have matching versions. PATCH version when you make backwards-compatible bug fixes.
The simplest way to be sure is just to delete node_modules and re-run npm i
from scratch, that way all modules will definitely be set up for the new Node version.
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