搞不懂了,尝试好久,不知道是什么问题
Last login: Sat Feb 8 15:05:32 on ttys000
linchundeMacBook-Air:~ linchun$ vue -h
Usage: vue <command> [options]
Options:
-V, --version output the version number
-h, --help output usage information
Commands:
init generate a new project from a template
list list available official templates
build prototype a new project
create (for v3 warning only)
help [cmd] display help for [cmd]
linchundeMacBook-Air:~ linchun$ vue list
Available official templates:
★ browserify - A full-featured Browserify + vueify setup with hot-reload, linting & unit testing.
★ browserify-simple - A simple Browserify + vueify setup for quick prototyping.
★ pwa - PWA template for vue-cli based on the webpack template
★ simple - The simplest possible Vue setup in a single HTML file
★ webpack - A full-featured Webpack + vue-loader setup with hot reload, linting, testing & css extraction.
★ webpack-simple - A simple Webpack + vue-loader setup for quick prototyping.
linchundeMacBook-Air:~ linchun$ vue init webpack mall-project
? Target directory exists. Continue? Yes
? Project name mall-project
? Project description 在线商城WebApp
? Author
? Vue build runtime
? Install vue-router? Yes
? Use ESLint to lint your code? Yes
? Pick an ESLint preset Standard
? Set up unit tests No
? Setup e2e tests with Nightwatch? No
? Should we run `npm install` for you after the project has been created? (recom
mended) no
vue-cli · Generated "mall-project".
# Project initialization finished!
# ========================
To get started:
cd mall-project
npm install (or if using yarn: yarn)
npm run lint -- --fix (or for yarn: yarn run lint --fix)
npm run dev
Documentation can be found at https://vuejs-templates.github.io/webpack
linchundeMacBook-Air:~ linchun$ cd /Users/linchun/Desktop/vue-mall cd mall-project
linchundeMacBook-Air:vue-mall linchun$ cnpm install
npminstall WARN package.json not exists: /Users/linchun/Desktop/vue-mall/package.json
✔ Installed 0 packages
✔ Linked 0 latest versions
✔ Run 0 scripts
✔ All packages installed (used 8ms(network 5ms), speed 0B/s, json 0(0B), tarball 0B)
linchundeMacBook-Air:vue-mall linchun$ npm run lint -- --fix
npm ERR! code ENOENT
npm ERR! syscall open
npm ERR! path /Users/linchun/Desktop/vue-mall/package.json
npm ERR! errno -2
npm ERR! enoent ENOENT: no such file or directory, open '/Users/linchun/Desktop/vue-mall/package.json'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/linchun/.npm/_logs/2020-02-08T07_16_38_559Z-debug.log
linchundeMacBook-Air:vue-mall linchun$
正在回答 回答被采纳积分+1
按照老师视频的操作步骤,操作了很多次最后就只有一个这个空文件。不知道什么原因项目创建不出
Last login: Sun Feb 9 15:41:31 on ttys000
linchundeMacBook-Air:~ linchun$ vue init webpack mall-project
? Target directory exists. Continue? Yes
? Project name mall-project
? Project description A Vue.js project
? Author
? Vue build runtime
? Install vue-router? Yes
? Use ESLint to lint your code? Yes
? Pick an ESLint preset Standard
? Set up unit tests No
? Setup e2e tests with Nightwatch? No
? Should we run `npm install` for you after the project has been created? (recom
mended) no
vue-cli · Generated "mall-project".
# Project initialization finished!
# ========================
To get started:
cd mall-project
npm install (or if using yarn: yarn)
npm run lint -- --fix (or for yarn: yarn run lint --fix)
npm run dev
Documentation can be found at https://vuejs-templates.github.io/webpack
linchundeMacBook-Air:~ linchun$ cd /Users/linchun/Desktop/vue-mall cd mall-project
linchundeMacBook-Air:vue-mall linchun$ npm cache clean --force
npm WARN using --force I sure hope you know what you are doing.
linchundeMacBook-Air:vue-mall linchun$ cnpm install
npminstall WARN package.json not exists: /Users/linchun/Desktop/vue-mall/package.json
✔ Installed 0 packages
✔ Linked 0 latest versions
✔ Run 0 scripts
✔ All packages installed (used 7ms(network 4ms), speed 0B/s, json 0(0B), tarball 0B)
linchundeMacBook-Air:vue-mall linchun$ npm run lint -- --fix
npm ERR! code ENOENT
npm ERR! syscall open
npm ERR! path /Users/linchun/Desktop/vue-mall/package.json
npm ERR! errno -2
npm ERR! enoent ENOENT: no such file or directory, open '/Users/linchun/Desktop/vue-mall/package.json'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/linchun/.npm/_logs/2020-02-09T07_48_01_196Z-debug.log
linchundeMacBook-Air:vue-mall linchun$ npm run dev
npm ERR! code ENOENT
npm ERR! syscall open
npm ERR! path /Users/linchun/Desktop/vue-mall/package.json
npm ERR! errno -2
npm ERR! enoent ENOENT: no such file or directory, open '/Users/linchun/Desktop/vue-mall/package.json'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/linchun/.npm/_logs/2020-02-09T07_48_21_118Z-debug.log
linchundeMacBook-Air:vue-mall linchun$
- 参与学习 人
- 提交作业 239 份
- 解答问题 10739 个
本阶段带你深入前端开发的肌理,通过ES6基础知识和前端主流高级框架的学习,助你快速构建企业级移动webAPP应用,进入职场的终极battle
了解课程
恭喜解决一个难题,获得1积分~
来为老师/同学的回答评分吧
0 星