vue-cli: Node 18 support : @achrinza/node-ipc@9.2.2: The engine "node" is incompatible with this module. Expected version "8 || 10 || 12 || 14 || 16 || 17"

Version

5.0.8

Environment info

Environment Info:

  System:
    OS: Windows 10 10.0.22621
    CPU: (12) x64 Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz
  Binaries:
    Node: 18.17.1 - C:\Program Files\nodejs\node.EXE
    Yarn: 1.22.19 - ~\AppData\Roaming\npm\yarn.CMD
    npm: 3.10.10 - C:\Program Files\nodejs\npm.CMD
  Browsers:
    Chrome: Not Found
    Edge: Spartan (44.22621.2134.0), Chromium (116.0.1938.76)
  npmGlobalPackages:
    @vue/cli: Not Found

Steps to reproduce

I intend to switch from Node.js version 16 to version 18. However, when I update my vue-cli package to either ~5.0.6 or ~5.0.8, I encounter the following error related to the @achrinza/node-ipc package, as illustrated below. To address this problem, I’ve implemented a workaround using the resolutions option in my package.json file, which seems to resolve the issue. Are there any alternative or more effective methods to resolve this problem?

“resolutions”: { “@achrinza/node-ipc”: “10.1.9” },

[2/4] Fetching packages… error @achrinza/node-ipc@9.2.2: The engine “node” is incompatible with this module. Expected version “8 || 10 || 12 || 14 || 16 || 17”. Got “18.17.1” error Found incompatible module. info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.

What is expected?

My build should work without any errors

What is actually happening?

It is giving me above mentioned issue

About this issue

  • Original URL
  • State: open
  • Created 10 months ago
  • Reactions: 12
  • Comments: 19 (1 by maintainers)

Most upvoted comments

@jokay Vue2 is EOL by the end of the year. You probably had enough time to migrate towards Vue3 at this point, the leap is not that big. Also, you can totally have Vite and Vue2 at the same time. Vite doesn’t mean Vue3. Old browsers engines as in IE10? Yeah, time to upgrade. 🤗

@gankush so here we’re talking about upgrading towards a recent Node version but not bumping up the Vite part? If you move forward on one side, expect to be moving on the other. You can’t use the latest greatest thing while keeping some legacy alongside. Either keep both legacy or upgrade both.

If you have the NEED to upgrade, then you can probably take some time to upgrade it or pay some people for it. Otherwise, you are probably good enough keeping the old version and not upgrading. Code needs maintenance, take the time to reflect and anticipate upcoming changes. If you don’t do that on time, you’ll have some dilemmas like those coming at you some day.

It’s like saying

yooooo, I can’t play to the latest Cyberpunk game with my RTX 4090 with RTX ON and DLSS 3.3 on my Windows XP 😱

@jokay using mid-tier Android device here so far, not a weirdo changing phone yearly either. 😂

My point still stands, either think about things ahead of time (especially if relying on JS) or hire a few people to be able to migrate towards things faster. If dealing with hardware, I guess that the decision is even harder to take for sure (worked with a service provided by Raspberry Pis in the past myself 😰). GL with all of that buddy! 🤗 (didn’t meant to be rude in my previous message, sorry 🙊)

I see from your error you are on version 9.2.2.

you need to be on @achrinza/node-ipc version 9.2.5 or later for node 18 support. (and 9.2.7+ for node 20)

@kissu yooooo, it’s a hardware dependency, we are not talking about exchanging 1 private consumer device but thank you for your advice 🤷🏼‍♂️

Don’t use your yearly iPhone exchange to have the very latest device as reference for everyone’s situation 😉

This is obsolete and should not be used anymore: https://cli.vuejs.org/

True for new projects, but what if you can’t migrate existing projects to Vue.js 3.x and need to stay on Vue.js 2.x due to compatibility reasons?

There are still some IoT devices having older browser engines which are still in production.

Works flawlessly for me (both for Vue3 and Nuxt3). image


@gankush please make sure that you’re using Vite and not Webpack. This is the way to go nowadays: https://vuejs.org/guide/quick-start.html#creating-a-vue-application This is obsolete and should not be used anymore: https://cli.vuejs.org/ TLDR: you should not be using @vue/cli as of 2023, hence why this issue is a good reminder to upgrade your bundler as a whole.


The original package @achrinza/node-ipc fully supports Node v21 since yesterday so that should be fine for Node v18. Btw, if you don’t have a very specific need for it, I recommend sticky to an LTS version as of today aka: v18 or v20.

相同

我清除了 yarn 的缓存 yarn cache clean 然后升级了一下yarn 的版本之后 yarn set version stable (3.6.3) 执行 yarn create vite 成功

Thank you kissu and jokey!

the problem here is that the project is old and I can’t use vite or upgrade the entire bundle.

I have to slick on using the vue cli which is turn has dependency on @achrinza/node-ipc@9.2.2 (which is not compatible with node versions 18 or higher)