vue-cli-service build --dest

Created on 3 Sep 2018  Â·  3Comments  Â·  Source: vuejs/vue-cli

Version

3.0.1

Node and OS info

Node 8.11.4 / npm 6.4.1 / Ubuntu 18.04

Steps to reproduce

Create new project and run
vue run build --dest directory

What is expected?

All generated files are in "directory"

What is actually happening?

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.

Most helpful comment

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

All 3 comments

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 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

npm run-script [--silent] [-- ...]

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"
},
Was this page helpful?
0 / 5 - 0 ratings