Closed luckydonald closed 6 years ago
Hi @luckydonald
I installed the same options with yarn on my macbook, and everythign worked as expected. So I can't reproduce the issue.
Can you try again and see if this is still a problem? I remember npm had some issues yesterday, maybe that played into it.
Here is my process of installing, note that the vue
command never works, and I use yarn run vue
instead.
Here is some more context in case that is the issue:
$ vue create .
vue: command not found
$ yarn run vue create .
yarn run v1.9.4
error Command "vue" not found.
$ yarn add --dev @vue/cli
...
# install stuff
$ vue create .
vue: command not found
$ yarn run vue create .
yarn run v1.9.4
$ /path/to/project/node_modules/.bin/vue create .
Vue CLI v3.1.1
? Generate project in current directory? Yes
Vue CLI v3.1.1
? Please pick a preset: first (vue-router, sass, babel, eslint)
Vue CLI v3.1.1
✨ Creating project in /path/to/project.
⚙ Installing CLI plugins. This might take a while...
[1/4] 🔍 Resolving packages...
[2/4] 🚚 Fetching packages...
[3/4] 🔗 Linking dependencies...
[4/4] 📃 Building fresh packages...
success Saved lockfile.
🚀 Invoking generators...
ERROR Error: Cannot find module 'yaml-front-matter'
Error: Cannot find module 'yaml-front-matter'
at Function.Module._resolveFilename (module.js:542:15)
at Function.Module._load (module.js:472:25)
at Module.require (module.js:585:17)
at require (internal/module.js:11:18)
at renderFile (/path/to/project/node_modules/@vue/cli/lib/GeneratorAPI.js:315:16)
at _injectFileMiddleware (/path/to/project/node_modules/@vue/cli/lib/GeneratorAPI.js:184:27)
at <anonymous>
at process._tickCallback (internal/process/next_tick.js:188:7)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
Here are the files crated:
$ cat package.json
{
"name": "project",
"version": "0.1.0",
"private": true,
"devDependencies": {
"@vue/cli-plugin-babel": "^3.1.1",
"@vue/cli-plugin-eslint": "^3.1.1",
"@vue/cli-service": "^3.1.1"
}
}
Well you should install @vue/cli globally, not locally
Huh, that fixed it. Thanks!
There is an way to install @vue/cli into the parent folder.
same issue here, when starting vue create .
with globally installed @vue/cli(v3.8.4)
.
the error info beblow:
> vue create .
Vue CLI v3.8.4
? Generate project in current directory? Yes
Vue CLI v3.8.4
? Please pick a preset: default (babel, eslint)
Vue CLI v3.8.4
✨ Creating project in /Users/cdll/github/niuwa-spa/disneystar.
⚙ Installing CLI plugins. This might take a while...
removed 324 packages and audited 23913 packages in 11.082s
found 0 vulnerabilities
🚀 Invoking generators...
ERROR Error: Cannot find module 'yaml-front-matter'
Error: Cannot find module 'yaml-front-matter'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:5
82:15)
at Function.Module._load (internal/modules/cjs/loader.js:508:25)
at Module.require (internal/modules/cjs/loader.js:637:17)
at require (internal/modules/cjs/helpers.js:22:18)
at renderFile (/Users/cdll/github/niuwa-spa/disneystar/node_modules/@
vue/cli/lib/GeneratorAPI.js:325:16)
at _injectFileMiddleware (/Users/cdll/github/niuwa-spa/disneystar/nod
e_modules/@vue/cli/lib/GeneratorAPI.js:184:27)
at process._tickCallback (internal/process/next_tick.js:68:7)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! disneystar@0.1.0 init: `vue create .`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the disneystar@0.1.0 init 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/cdll/.npm/_logs/2019-07-02T01_43_57_011Z-debug.log
all right, it's using my local vue...
I ran into the same issue with a locally installed @vue/cli
fix: npm install yaml-front-matter
after that, npx vue add vuetify worked.
is there a reason why a local vue shouldnt work?
Version
3.1.1
Node and OS info
yarn v1.9.4, MacOS 10.9.5,
Steps to reproduce
What is expected?
Working install
What is actually happening?
It is failing
no