Version
v1.1.1
Reproduction link
http://no-need-for-a-link.example.com
Steps to reproduce
β npx create-nuxt-app anime-list-front
npx : 307 installΓ©(s) en 9.648s
Generating Nuxt.js project in /Users/Oliboy50/anime-list-front
? Project name anime-list-front
? Project description anime-list-front
? Use a custom server framework none
? Use a custom UI framework bulma
? Choose rendering mode Universal
? Use axios module yes
? Use eslint yes
? Author name Oliboy50
? Choose a package manager npm
β cd anime-list-front
β anime-list-front git:(master) β npm run dev
// it should already work here
// but let's retrying after installing npm dependencies ourselves
β anime-list-front git:(master) β npm install
β anime-list-front git:(master) β npm run dev
// it still does not work (but with another unrelated error)
What is expected ?
-
Choosing the "npm" package manager, I shouldn't see "yarn install v0.27.5" (or you should explain why nuxt would need it)
-
"To get started:" section should tell to run "npm install" (or it would be even better to run it itself if possible)
-
After running "npm install" (or not if create-nuxt-app runs it itself), the brand new project should build as expected
which is not the case, as I still have an issue with a syntax error issue (an object spread operator which requires a bit more babel configuration)
What is actually happening?
β npx create-nuxt-app anime-list-front
npx : 307 installΓ©(s) en 9.648s
Generating Nuxt.js project in /Users/Oliboy50/anime-list-front
? Project name anime-list-front
? Project description anime-list-front
? Use a custom server framework none
? Use a custom UI framework bulma
? Choose rendering mode Universal
? Use axios module yes
? Use eslint yes
? Author name Oliboy50
? Choose a package manager npm
Initialized empty Git repository in /Users/Oliboy50/anime-list-front/.git/
yarn install v0.27.5
info No lockfile found.
[1/4] Resolving packages...
[2/4] Fetching packages...
[3/4] Linking dependencies...
[4/4] Building fresh packages...
success Saved lockfile.
Done in 0.10s.
To get started:
cd anime-list-front
npm run dev
To build & start for production:
cd anime-list-front
npm run build
npm start
β cd anime-list-front
β anime-list-front git:(master) β npm run dev
[email protected] dev /Users/Oliboy50/anime-list-front
nuxt
sh: nuxt: command not found
npm ERR! file sh
npm ERR! code ELIFECYCLE
npm ERR! errno ENOENT
npm ERR! syscall spawn
npm ERR! [email protected] dev: nuxt
npm ERR! spawn ENOENT
npm ERR!
npm ERR! Failed at the [email protected] dev script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm WARN Local package.json exists, but node_modules missing, did you mean to install?
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/Oliboy50/.npm/_logs/2018-03-31T15_38_18_929Z-debug.log
β anime-list-front git:(master) β npm install
[email protected] install /Users/Oliboy50/anime-list-front/node_modules/fsevents
node install
[fsevents] Success: "/Users/Oliboy50/anime-list-front/node_modules/fsevents/lib/binding/Release/node-v57-darwin-x64/fse.node" already installed
Pass --update-binary to reinstall or --build-from-source to recompile
[email protected] postinstall /Users/Oliboy50/anime-list-front/node_modules/webpack/node_modules/uglifyjs-webpack-plugin
node lib/post_install.js
[email protected] postinstall /Users/Oliboy50/anime-list-front/node_modules/nuxt
opencollective postinstall || exit 0
:=.
-=+=: :-
.-=+++=: :++=.
.-+++++++=++++=.
.=+++++++****++++.
:=+++++++******++*+:
:=+++++++********++*+:
:=+++++++**********++*+-
-=+++++++*************+*+-.
.-=======+**************++++=.
.........::::::::::::::::::::.
Thanks for installing nuxt π
Please consider donating to our open collective
to help us maintain this package.
Number of contributors: 106
Number of backers: 76
Annual budget: US$Β 11,539
Current balance: US$Β 2,794
π Donate: https://opencollective.com/nuxtjs/donate
npm notice created a lockfile as package-lock.json. You should commit this file.
npm WARN [email protected] requires a peer of ajv@^6.0.0 but none is installed. You must install peer dependencies yourself.
added 1367 packages from 732 contributors in 21.691s
β anime-list-front git:(master) β npm run dev
[email protected] dev /Users/Oliboy50/anime-list-front
nuxt
/Users/Oliboy50/anime-list-front/node_modules/nuxt/lib/core/middleware/nuxt.js:72
const policies = this.options.render.csp.policies ?
{...this.options.render.csp.policies} : null
^^^
SyntaxError: Unexpected token ...
at createScript (vm.js:74:10)
at Object.runInThisContext (vm.js:116:10)
at Module._compile (module.js:533:28)
at Object.Module._extensions..js (module.js:580:10)
at Module.load (module.js:503:32)
at tryModuleLoad (module.js:466:12)
at Function.Module._load (module.js:458:3)
at Module.require (module.js:513:17)
at require (internal/module.js:11:18)
at Object. (/Users/Oliboy50/anime-list-front/node_modules/nuxt/lib/core/renderer.js:19:24)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] dev: nuxt
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] dev script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/Oliboy50/.npm/_logs/2018-03-31T15_39_43_454Z-debug.log
Additional comments?
In fact, I think the "..." (from "...this.options.render.csp.policies") is broken in "nuxt" project itself, as I had the same issue on a project built using "starter" template with a old "nuxt" version which I tried to update
(then it didn't work, and I re-created a new one using "create-nuxt-app" and seeing it still didn't work, I decided to submit an issue... even if it a PITA since I had to authorize "cmty.io" to have full read/write access to everything on my github account and the organizations I belong to...)
This bug report is available on Nuxt.js community (#c30)