nvm管理node版本

发布于:2025-05-13 ⋅ 阅读:(7) ⋅ 点赞:(0)

To manage Node.js versions on Windows, I recommend using nvm-windows (Node Version Manager for Windows). Here’s how we can handle this:

  1. First, let’s install nvm-windows. I’ll propose a command to check if it’s already installed:
nvm version

Great! I see that nvm-windows is already installed (version 1.1.12). Now, let’s:

  1. List available Node.js versions
  2. Install a compatible version (let’s use Node.js 18 LTS)
  3. Switch to that version

Here are the commands:

nvm list available

Now, let’s install Node.js 18 (which is compatible with your package) and switch to it:

nvm install 18.19.1

Now let’s switch to Node.js 18:

nvm use 18.19.1

Perfect! Now you’re using Node.js 18.19.1, which is compatible with the @achrinza/node-ipc package. Here’s a summary of what we did:

  1. Verified nvm-windows was installed
  2. Listed available Node.js versions
  3. Installed Node.js 18.19.1
  4. Switched to Node.js 18.19.1

You can now try running your project again, and the version compatibility error should be resolved.

Some useful nvm-windows commands for future reference:

  • nvm list - Show installed versions
  • nvm use <version> - Switch to a specific version
  • nvm install <version> - Install a new version
  • nvm uninstall <version> - Remove a version

If you need to switch back to Node.js 20 in the future, you can use nvm use 20.15.1.


网站公告

今日签到

点亮在社区的每一天
去签到