请稍等 ...
×

采纳答案成功!

向帮助你的同学说点啥吧!感谢那些助人为乐的人

在执行vue init webpack Travel后报错

D:>vue init webpack Travel

? Target directory exists. Continue? Yes
? Project name travel
? Project description A Vue.js project
? Author tengfang 631385124@qq.com
? Vue build standalone
? 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? (recommended) npm

vue-cli · Generated “Travel”.

Installing project dependencies …

========================

npm WARN deprecated extract-text-webpack-plugin@3.0.2: Deprecated. Please use https://github.com/webpack-contrib/mini-css-extract-plugin
npm WARN deprecated browserslist@2.11.3: Browserslist 2 could fail on reading Browserslist >3.0 config used in other tools.
npm WARN deprecated bfj-node4@5.3.1: Switch to the bfj package for fixes and new features!
npm WARN deprecated flatten@1.0.2: I wrote this module a very long time ago; you should use something else.
npm WARN deprecated browserslist@1.7.7: Browserslist 2 could fail on reading Browserslist >3.0 config used in other tools.
npm WARN deprecated circular-json@0.3.3: CircularJSON is in maintenance only, flatted is its successor.
npm ERR! Unexpected end of JSON input while parsing near ‘…a33ea9",“tarball”:"ht’

npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\dell\AppData\Roaming\npm-cache_logs\2019-06-27T16_48_14_734Z-debug.log

Running eslint --fix to comply with chosen preset rules…

========================

travel@1.0.0 lint D:\Travel
eslint --ext .js,.vue src “–fix”

‘eslint’ 不是内部或外部命令,也不是可运行的程序
或批处理文件。
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! travel@1.0.0 lint: eslint --ext .js,.vue src "--fix"
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the travel@1.0.0 lint script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm WARN Local package.json exists, but node_modules missing, did you mean to install?

npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\dell\AppData\Roaming\npm-cache_logs\2019-06-27T16_48_17_535Z-debug.log

Project initialization finished!

========================

正在回答 回答被采纳积分+3

1回答

Dell 2019-06-30 21:57:18

删了node_modules,换cnpm重新安装依赖

0 回复 有任何疑惑可以回复我~
  • 老师,我node_modules文件里有minimatch,npm,vue-cli,webpack四个文件夹。我要把node_modules文件删除后,再用cnpm  install -g vue-cli@2.9.3这个指令,报了找不到commander这个模板。还是我指令用错了,麻烦老师解答一下。。
    回复 有任何疑惑可以回复我~ 2020-02-13 19:31:55
  • 重新安装vue-cli,然后重新初始项目,安装依赖
    回复 有任何疑惑可以回复我~ 2020-02-14 23:54:04
问题已解决,确定采纳
还有疑问,暂不采纳
意见反馈 帮助中心 APP下载
官方微信