3.0.1
Node 8.11.4 / npm 6.4.1 / Ubuntu 18.04
Create new project and run
vue run build --dest directory
All generated files are in "directory"
zverev@work:~/workspace/vue-test$ npm run build --dest directory
[email protected] build /home/zverev/workspace/vue-test
vue-cli-service build "directory"
â ‹ Building for production...
ERROR Failed to compile with 1 errors 18:16:04
error
Entry module not found: Error: Can't resolve '/home/zverev/workspace/vue-test/directory' in '/home/zverev/workspace/vue-test'
ERROR Build failed with errors.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] build:vue-cli-service build "directory"
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
My fault
If you want to use custom arguments on npm run you should use such command with additional --(https://docs.npmjs.com/cli/run-script#synopsis)
npm run build -- --dest folder
Or you can use npx:
npx vue-cli-service build --dest folder
My fault
If you want to use custom arguments onnpm runyou should use such command with additional--(https://docs.npmjs.com/cli/run-script#synopsis)
npm run build -- --dest folderOr you can use npx:
npx vue-cli-service build --dest folder
npm run-script
should be .... npm run build -- dest ?
but doesn`t work, it works normal in other not use vue-cli-service
in the case of github pages. it will either use root folder or docs folder. Change a bit in package.json to have consistency syntax.
"scripts": {
"serve": "vue-cli-service serve",
"build": "vue-cli-service build --prefix docs --dest docs",
"lint": "vue-cli-service lint"
},
Most helpful comment
My fault
If you want to use custom arguments on
npm runyou should use such command with additional--(https://docs.npmjs.com/cli/run-script#synopsis)npm run build -- --dest folderOr you can use npx:
npx vue-cli-service build --dest folder