请稍等 ...
×

采纳答案成功!

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

npm 初始化项目时报错

老师:
vue init webpack Travel 初始化项目时 很慢很慢,过了会报以下 错误,我是用手机做热点 的。
npm WARN registry Unexpected warning for https://registry.npmjs.org/: Miscellaneous Warning ECONNRESET: request to https://registry.npmjs.org/chalk failed, reason: read ECONNRESET

安装环境 :
Specify configs in the ini-formatted file:
C:\Users\ct0030.npmrc
or on the command line via: npm --key value
Config info can be viewed via: npm help config

npm@6.2.0 C:\Program Files\nodejs\node_modules\npm

E:\vuepractice>npm -v
6.2.0

E:\vuepractice>node -v
v10.8.0

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

1回答

提问者 方家亮 2018-09-23 11:23:52


重新 npm  -install vue后,重新 创建个新文件夹mytravel,报错不一样了,但还是启动不了工程,急!!!



E:\vuepractice>vue init webpack mytravel


? Target directory exists. Continue? Yes

? Project name mytravel

? Project description A Vue.js project

? Author fangjialiang <fangjialiang@saicmotor.com>

? Vue build (Use arrow keys)

? 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? (recom

? Should we run `npm install` for you after the project has been created? (recom


mended) npm


   vue-cli · Generated "mytravel".



# Installing project dependencies ...

# ========================


npm WARN deprecated browserslist@2.11.3: Browserslist 2 could fail on reading Br

owserslist >3.0 config used in other tools.

npm WARN deprecated bfj-node4@5.3.1: Switch to the `bfj` package for fixes and n

ew features!

npm WARN deprecated browserslist@1.7.7: Browserslist 2 could fail on reading Bro

wserslist >3.0 config used in other tools.

npm ERR! Unexpected end of JSON input while parsing near '...andard/-/eslint-plu

gi'


npm ERR! A complete log of this run can be found in:

npm ERR!     C:\Users\ct0030\AppData\Roaming\npm-cache\_logs\2018-09-23T03_18_00

_006Z-debug.log



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

# ========================



> mytravel@1.0.0 lint E:\vuepractice\mytravel

> eslint --ext .js,.vue src "--fix"


'eslint' 不是内部或外部命令,也不是可运行的程序

或批处理文件。

npm ERR! code ELIFECYCLE

npm ERR! errno 1

npm ERR! mytravel@1.0.0 lint: `eslint --ext .js,.vue src "--fix"`

npm ERR! Exit status 1

npm ERR!

npm ERR! Failed at the mytravel@1.0.0 lint script.

npm ERR! This is probably not a problem with npm. There is likely additional log

ging output above.

npm WARN Local package.json exists, but node_modules missing, did you mean to in

stall?


npm ERR! A complete log of this run can be found in:

npm ERR!     C:\Users\ct0030\AppData\Roaming\npm-cache\_logs\2018-09-23T03_18_03

_232Z-debug.log


# Project initialization finished!

# ========================


To get started:


  cd mytravel

  npm run dev


Documentation can be found at https://vuejs-templates.github.io/webpack


1 回复 有任何疑惑可以回复我~
  • Dell #1
    cd mytravel 
     npm run dev
    回复 有任何疑惑可以回复我~ 2018-09-23 23:52:19
问题已解决,确定采纳
还有疑问,暂不采纳
意见反馈 帮助中心 APP下载
官方微信