Skip to content

Unexpected token '||=' on node v<16 #15231

Closed as not planned
Closed as not planned
@zecka

Description

@zecka

Environment


  • Operating System: Darwin
  • Node Version: v16.18.0
  • Nuxt Version: 3.0.0-rc.12
  • Nitro Version: -
  • Package Manager: [email protected]
  • Builder: vite
  • User Config: -
  • Runtime Modules: -
  • Build Modules: -

Reproduction

  • nvm install 14.19.1
  • nvm use 14.19.1
  • npx nuxi init nuxt-app
  • cd nuxt-app
  • yarn install
  • yarn dev -o

Describe the bug

Unable to run nuxt 3 on node v14.19.1 or 14.18.0.

Got following error: Unexpected token '||='

Unable to install dependencies on v 14.16 or 15.14, got following error
error @vitejs/[email protected]: The engine "node" is incompatible with this module. Expected version "^14.18.0 || >=16.0.0". Got "14.16.1"

Nuxt documentation tell that nuxt should work on node v 14.16

Maybe getting started page on documentation should be updated

Additional context

No response

Logs

500
Unexpected token '||='

at new Script (vm.js:102:7)
at createScript (vm.js:262:10)
at Object.runInThisContext (vm.js:310:10)
at ViteNodeRunner.directRequest (./node_modules/vite-node/dist/client.mjs:246:19)
at processTicksAndRejections (internal/process/task_queues.js:95:5)
at async ViteNodeRunner.cachedRequest (./node_modules/vite-node/dist/client.mjs:128:12)
at async request (./node_modules/vite-node/dist/client.mjs:151:16)
at async ./node_modules/nuxt/dist/app/composables/index.mjs:46:31
at async ViteNodeRunner.directRequest (./node_modules/vite-node/dist/client.mjs:251:5)
at async ViteNodeRunner.cachedRequest (./node_modules/vite-node/dist/client.mjs:128:12)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions