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

Newer versions of node install outdated quint 0.18.3 #1602

Closed
xuanmir opened this issue Mar 9, 2025 · 4 comments · Fixed by #1605
Closed

Newer versions of node install outdated quint 0.18.3 #1602

xuanmir opened this issue Mar 9, 2025 · 4 comments · Fixed by #1605

Comments

@xuanmir
Copy link

xuanmir commented Mar 9, 2025

Just spent several hours trying to fix this.

When trying the Secret Santa example, I kept getting an ERR_ASSERTION error.

After going through the docs for the Nth time, I noticed my version of Quint was older than the one on npm. This didn't make sense, I just installed Quint last week, I had all the latest versions of Node and Java. I ran the installation script again. But nothing happened, Quint remained stuck on 0.18.3, it was impossible to upgrade.

npm i @informalsystems/quint -g will only tell you:

npm warn deprecated [email protected]: This package is deprecated. Use require('node:util').isDeepStrictEqual instead.

…and proceed to install quint 0.18.3

Thanks to Claude, I eventually found that npm install -g @informalsystems/quint@latest will tell you:

npm warn EBADENGINE Unsupported engine {
npm warn EBADENGINE   package: '@informalsystems/[email protected]',
npm warn EBADENGINE   required: { node: '18 - 20' },
npm warn EBADENGINE   current: { node: 'v22.14.0', npm: '10.9.2' }
npm warn EBADENGINE }
npm warn deprecated [email protected]: This package is deprecated. Use require('node:util').isDeepStrictEqual instead.

So nvm install 20, reinstall quint, and now it's 0.23.0

I deleted other node versions.

Reinstalled node 22, reinstalled Quint, version 0.18.3
Reinstalled node 23, reinstalled Quint, version 0.18.3

Went back to node 20, now everything works.

I don't know if this is something Quint can fix, or if it depends completely on Node, but at least you might want to add an explicit warning in your docs to not use newer versions of Node.

I would also add a required Quint version in the examples, or perhaps even in the module code, because all the previous tutorials worked flawlessly so I was unaware that I was using an older version. If secret_santa.qnt specified a required Quint version, it would have taken me a couple seconds to find out this was the problem.

@bugarela
Copy link
Collaborator

bugarela commented Mar 9, 2025

Hi! Yes, I've seen this problem many times - I think always on Mac. My suspicion was that it was something that homebrew's version of node does, but I was not sure because I don't own a Mac and could never reproduce this problem on my machines. I looked up solutions at one point and couldn't find anything. Maybe people on linux/windows generally use older versions of node as default and that's why they don't hit this problem so often.

I like your idea of a warning, perhaps something that uses GitHub's API to see check what version is the latest and issue a warning (only if internet connection is available, which is not required by Quint otherwise)

I can also update the installation docs to instruct people to check if the version is the latest one after installing.

Keeping a version in the examples could be hard to maintain, but there are CI checks that make sure all of them work on the latest version, so I think the warning idea addresses this problem well.

I'll also see if there's anything I can do with the dependencies now that I have this information from your report, thanks a lot! I'll find some time to look at it this week.

@bugarela
Copy link
Collaborator

I've been able to reproduce this finally!

$ node --version
v22.12.0
$ npm i @informalsystems/quint -g
npm warn deprecated [email protected]: This package is deprecated. Use require('node:util').isDeepStrictEqual instead.

added 76 packages in 3s

4 packages are looking for funding
  run `npm fund` for details
$ quint --version
0.18.3

@bugarela
Copy link
Collaborator

Confirmed the issue, we started capping the node version to 20 at v0.19.0, so that's why it installs v0.18.3 on node > 20: v0.18.3...v0.19.0

Image

@bugarela
Copy link
Collaborator

Confirmed that this fixed the problem:

$ node --version
v22.12.0
$ npm i @informalsystems/quint -g
npm warn deprecated [email protected]: This package is deprecated. Use require('node:util').isDeepStrictEqual instead.

added 76 packages in 11s

4 packages are looking for funding
  run `npm fund` for details
$ quint --version
0.23.1

I created #1606 to take care of the deprecation warning (as that had lower priority than fixing this)

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

Successfully merging a pull request may close this issue.

2 participants