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 version detection is warning on compatible version #12839

Closed
danielroe opened this issue Oct 29, 2021 · 4 comments · Fixed by nuxt/framework#1598
Closed

node version detection is warning on compatible version #12839

danielroe opened this issue Oct 29, 2021 · 4 comments · Fixed by nuxt/framework#1598
Assignees

Comments

@danielroe
Copy link
Member

Environment

codesandbox environment - linked below

Describe the bug

 WARN  Current version of Node.js (14.18.1) is unsupported and might cause issues.
       Please upgrade to a compatible version (^14.16.0 || ^16.11.0 || ^17.0.0).

Reproduction

https://codesandbox.io/s/wonderful-danny-qmodb?file=/nuxt.config.ts

Additional context

No response

Logs

No response

@danielroe danielroe changed the title using a legacy module that accesses $config fails node version detection is warning on compatible version Oct 29, 2021
@calebanthony
Copy link

I'm also getting this, but on Node 16:

WARN  Current version of Node.js (16.11.1) is unsupported and might cause issues.
       Please upgrade to a compatible version (^14.16.0 || ^16.11.0 || ^17.0.0).

@mpringlehlk
Copy link

mpringlehlk commented Oct 29, 2021

Same, with latest LTS on MacOS:

WARN  Current version of Node.js (16.13.0) is unsupported and might cause issues.                                                                                                                                                                                    
       Please upgrade to a compatible version (^14.16.0 || ^16.11.0 || ^17.0.0).

@jiangzhangy
Copy link

I'm also getting this:

`Nuxt CLI v3.0.0-27258467.4e424d0 11:36:26

WARN Current version of Node.js (16.13.0) is unsupported and might cause issues. 11:36:27
Please upgrade to a compatible version (^14.16.0 || ^16.11.0 || ^17.0.0).`

@danielroe
Copy link
Member Author

danielroe commented Oct 30, 2021

This is an issue with rollup bundling semver into the nuxi bundle. The bundled file is (abbreviated):

class Range$a {
  constructor (range, options) {
    if (range instanceof Comparator$3) {
      // ...
    }
  }
}

const Comparator$3 = comparator

class Comparator$2 {
  constructor (comp, options) {
    if (comp instanceof Comparator$2) {
      // ...
    }
  }
}

var comparator = Comparator$2;

In other words, we have a bit of mis-ordering of the file. So when semver.satisfies hits an error, because Comparator$3 isn't an object, it swallows it and returns false.

See npm/node-semver#381

@danielroe danielroe added cli and removed nuxt3 labels Oct 30, 2021
@danielroe danielroe self-assigned this Oct 30, 2021
@danielroe danielroe added the 3.x label Jan 19, 2023
@danielroe danielroe transferred this issue from nuxt/framework Jan 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants