Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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" #7424

Open
gankush opened this issue Sep 13, 2023 · 19 comments

Comments

@gankush
Copy link

gankush commented Sep 13, 2023

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

@YaminZheng
Copy link

the same

@YaminZheng
Copy link

相同

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

@darrinmn9
Copy link
Contributor

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)

@jokay
Copy link

jokay commented Oct 23, 2023

image

And version 9.2.8+ for node 21.x, see here.

@kissu
Copy link

kissu commented Oct 23, 2023

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.

@jokay
Copy link

jokay commented Oct 23, 2023

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.

@gankush
Copy link
Author

gankush commented Oct 23, 2023

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)

@kissu
Copy link

kissu commented Oct 23, 2023

@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
Copy link

jokay commented Oct 23, 2023

@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 😉

@kissu
Copy link

kissu commented Oct 24, 2023

@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 🙊)

@KarmaBlackshaw
Copy link

KarmaBlackshaw commented Jan 25, 2024

@jokay have you had any success in this? Do we really need to move to vite?

@jokay
Copy link

jokay commented Jan 25, 2024

@KarmaBlackshaw sorry no news about this, we use Vue.js 3.x with vite where possible and for the rest, the situation is unchanged.

@kissu
Copy link

kissu commented Jan 25, 2024

@jokay have you had any success in this? Do we really need to move to vite?

What do you propose else?

@KarmaBlackshaw
Copy link

@kissu @jokay thanks guys. Moving to vite is a fairly large work and testing the large codebase would require a big amount of time. So looking for safer alternatives.

@kissu
Copy link

kissu commented Jan 30, 2024

There are unfortunately not a lot of alternatives because Webpack is just a dying boat. Gonna either need a webpack expert to maintain the legacy or some gentle migration towards Vite (the migration may not be that difficult).
As for the codebase I don't know how many tests you do have but those could help for sure.

You will need to do it at some point anyway rather not postponing it.

@sergioisidoro
Copy link

You probably had enough time to migrate towards Vue3 at this point, the leap is not that big.

I think this is pretty big assumption to make. More than half of plugins we use are not available in Vue3, or the devs decided to re-write the entire plugin with massive breaking changes. It's not the same as re-writing our whole application, but close.

This attitude towards breaking changes and big rewrites from the ecosystem were a clear indicator for us to leave it. I guess issues like these confirm that decision :(

@kissu
Copy link

kissu commented Jan 31, 2024

You probably had enough time to migrate towards Vue3 at this point, the leap is not that big.

I think this is pretty big assumption to make. More than half of plugins we use are not available in Vue3, or the devs decided to re-write the entire plugin with massive breaking changes. It's not the same as re-writing our whole application, but close.

This attitude towards breaking changes and big rewrites from the ecosystem were a clear indicator for us to leave it. I guess issues like these confirm that decision :(

Vue3 is available for quite some time already. You cannot complain about it now like it is a rushed mandatory migration that was announced 3 months ago (like Apple would do).

I understand the pain of struggling to rewrite some stuff especially since some packages saw a massive change moving towards a composition API approach indeed. But that could have been part of some RFCs veto or slow migration towards something else or an abstraction wrapper that keeps the internals in the same way.

Realistically I do not see what kind of framework nowadays would not have those issues. Either you do things inside of your company to keep them the same way for a long time or you keep track and react accordingly.
Vue3 is not a big migration in itself. Things around it might indeed. But that comes de facto with the usage of JS and the need to make decisions regarding its maintenance on a mid-term notice.

@TheLonelyAdventurer
Copy link

相同

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

This solution actually worked for me.

Node 18.19.0, yarn 4.1.0 (stable at the time of writing), for template react-ts.

@KarmaBlackshaw
Copy link

Had success migrating it from vue to vite. Had to make another folder for easy migration then copy the .git folder to the new folder. Migrating it seems very impossible due to dependencies being in conflict with each other

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants