Same as here https://github.com/vuejs/vue-cli/issues/66 but that issue was closed without a solution.
$ vue init webpack myproject
vue-init(1) does not exist, try --help
$ vue list
vue-list(1) does not exist, try --help
$ vue --help
Usage: vue <command> [options]
Commands:
init generate a new project from a template
list list available official templates
help [cmd] display help for [cmd]
Options:
-h, --help output usage information
-V, --version output the version number
$ vue help init
vue-init(1) does not exist, try --help
Fresh new install (npm install --global vue-cli and npm install --global vue)
node 4.6.0
npm 2.15.9
vue 2.4.0
openSUSE 13.2 64-bit 3.16.7
fwiw, I was having this issue when I tried running vue after installing vue-cli globally with yarn.
Did yarn global add vue-cli and then had the does not exist issue.
Did npm install -g vue-cli and I don't have the issue - everything works fine.
Seems like a yarn or commander issue? commander reads the dir to sub-command's executable file but gets the parent dir of it.
I don't have yarn installed
same issue here, but installed with yarn global add vue-cli
Same issue, also installed with yarn global add vue-cli
@olegantonyan Updating node and npm may help
I haven't tested globals with yarn yet
I think I'm facing a similar issue with npm.
module.js:327
throw err;
^
Error: Cannot find module './src/init'
at Function.Module._resolveFilename (module.js:325:15)
at Function.Module._load (module.js:276:25)
at Module.require (module.js:353:17)
at require (internal/module.js:12:17)
at Object.<anonymous> (/Users/wlepinski/.nvm/versions/node/v4.6.0/lib/node_modules/vue-cli/node_modules/download-git-repo/node_modules/download/node_modules/vinyl-fs/node_modules/gulp-sourcemaps/index.js:4:9)
at Module._compile (module.js:409:26)
at Object.Module._extensions..js (module.js:416:10)
at Module.load (module.js:343:32)
at Function.Module._load (module.js:300:12)
at Module.require (module.js:353:17)
Looks like it's a problem with the gulp-sourcemaps package. It's missing the src folder on version 1.8.0. I also download the latest version (2.1.0) and seems to have the same problem.
I cloned the gulp-sourcemaps locally and linked to the dependency vue-cli/node_modules/download-git-repo/node_modules/download/node_modules/vinyl-fs and it worked.
@olegantonyan Does updating vue-cli helps?
@posva yep! just did npm install -g vue-cli, version hasn't changed (vue --version # => 2.4.0), but now it works
Had the problem with yarn global add vue-cli. Did an npm install -g vue-cliand it worked! Thanks @jingman
Would there be an intent to get vue-cli to work with yarn, or is that not in scope currently?
Same problem, any updates about this issue?
There's a fix at https://github.com/vuejs/vue-cli/pull/206 but I haven't tested it yet
I face the same problem so I use
vue-init command instead of vue init
This command is available in [email protected]
use
vue-init project-name
npm install -g vue-cli
this worked for me
Most helpful comment
fwiw, I was having this issue when I tried running
vueafter installingvue-cliglobally withyarn.Did
yarn global add vue-cliand then had thedoes not existissue.Did
npm install -g vue-cliand I don't have the issue - everything works fine.