1.vue create test(项目名)
2.npm i(cnpm install -g @vue/cli)
3.出现问题
PS C:\Users\16907\Desktop\demo1> npm i
npm WARN deprecated undefined@0.1.0: this package has been deprecated
npm WARN saveError ENOENT: no such file or directory, open 'C:\Users\16907\Desktop\package.json'
npm notice created a lockfile as package-lock.json. You should commit this file.
npm WARN enoent ENOENT: no such file or directory, open 'C:\Users\16907\Desktop\package.json'
npm WARN Desktop No description
npm WARN Desktop No repository field.
npm WARN Desktop No README data
npm WARN Desktop No license field.
解决方案:npm init(初始化)一直按enter
再次npm i
又出问题
npm WARN demo1@1.0.0 No description
npm WARN demo1@1.0.0 No repository field.
解决方案: 在全局(新建成)的package.json中配置description、repository
"description": "测试",
"repository": {
"type": "git",
"url": "https://gitee.com/y_project/RuoYi-Vue.git"
},
再次npm i
5.npm run serve