nuxt: Nuxt cannot initialize
Node version: v6.9.5 NPM version: 3.10.10 Nuxt version: latest
▶ nuxt
/Users/hsacramento/.nvm/versions/node/v6.9.5/lib/node_modules/nuxt/lib/core/module.js:14
async ready() {
^^^^^
SyntaxError: Unexpected identifier
at Object.exports.runInThisContext (vm.js:76:16)
at Module._compile (module.js:542:28)
at Object.Module._extensions..js (module.js:579:10)
at Module.load (module.js:487:32)
at tryModuleLoad (module.js:446:12)
at Function.Module._load (module.js:438:3)
at Module.require (module.js:497:17)
at require (internal/module.js:20:19)
at Object.<anonymous> (/Users/hsacramento/.nvm/versions/node/v6.9.5/lib/node_modules/nuxt/lib/core/index.js:2:16)
at Module._compile (module.js:570:32)
<div align="right">This question is available on Nuxt.js community (#c2358)</div>About this issue
- Original URL
- State: closed
- Created 6 years ago
- Reactions: 6
- Comments: 26 (3 by maintainers)
firebase functions is node 6-only
Nuxt.js 1.x requires node >=8 and npm >=5
cf. package.json https://github.com/nuxt/nuxt.js/blob/dev/package.json#L56
The latest build of nuxt-edge supports Node 6.x again by automatically falling back to the legacy build.
PS: Don’t forget to add
babel-polyfilldependency to your project if you need legacy build.Make sure to check your Node and Nuxt version. For Nuxt 1.4.0 you need at least Node 8.0.0. Also, did you use the starter template?
solve it by using node v8.11.2
I have the same issue with
firebase deployon my nuxt project. Firebase functions are only compatible withnode 6Nuxt is compatible withnode 8+…What a dilemma… What should I choose? My project uses both Nuxt and Firebase, so I can’t choose one of two…
@MarineLB try to upgrade your node.js version to the latest 8 LTS (currently v8.11)
I am also getting this issue while trying to run
firebase deployon my nuxt project. Firebase functions are only compatible with node 6 while nuxt is compatible with node 8+, so downgrading to node 6 is not an option for me.Anyone else having this problem?
Update node to version 8 helped. Thanks for the help.
My https socket server is not working with a node version > 6.11 so what should I do?