带有 npm install 命令的 Vue Javascript [英] Vue Javascript with npm install command

查看:96
本文介绍了带有 npm install 命令的 Vue Javascript的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是新的 Vue JS 学习者.想安装 Vue 并有兴趣在其中创建 Web 应用程序.所以,全局添加npm Vue

I am new Vue JS learner. Wanted to install Vue and interested to create web application in that. So,Globally added npm Vue

npm install --global vue-cli

这给了我:

npm WARN deprecated vue-cli@2.9.6: This package has been deprecated in favour of @vue/cli
npm WARN deprecated coffee-script@1.12.7: CoffeeScript on NPM has moved to "coffeescript" (no hyphen)
npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
C:\Users\Abhilash\AppData\Roaming\npm\vue -> C:\Users\Abhilash\AppData\Roaming\npm\node_modules\vue-cli\bin\vue
C:\Users\Abhilash\AppData\Roaming\npm\vue-init -> C:\Users\Abhilash\AppData\Roaming\npm\node_modules\vue-cli\bin\vue-init
C:\Users\Abhilash\AppData\Roaming\npm\vue-list -> C:\Users\Abhilash\AppData\Roaming\npm\node_modules\vue-cli\bin\vue-list
+ vue-cli@2.9.6
updated 1 package in 17.266s

后来我创建了新项目

vue init webpack my-project

这创建了一些文件夹和文件(还有 Package.json)

this created some folders and files (Also Package.json)

稍后按照程序给出的 cmd 为:

Later as per procedure given cmd as:

cd my-project
npm install

这会导致错误:

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 core-js@2.6.11: core-js@<3 is no longer maintained and not recommended for usage due to the number of issues. Please, upgrade your dependencies to the actual version of core-js@3.
npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated bfj-node4@5.3.1: Switch to the `bfj` package for fixes and new features!
npm WARN deprecated mkdirp@0.5.1: Legacy versions of mkdirp are no longer supported. Please update to mkdirp 1.x. (Note that the API surface has changed to use Promises in 1.x.)
npm WARN deprecated json3@3.3.2: Please use the native JSON object instead of JSON 3
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 WARN deprecated socks@1.1.10: If using 2.x branch, please upgrade to at least 2.1.6 to avoid a serious bug with socket data flow and an import issue introduced in 2.1.0
npm WARN deprecated left-pad@1.3.0: use String.prototype.padStart()
npm WARN deprecated resolve-url@0.2.1: https://github.com/lydell/resolve-url#deprecated
npm WARN deprecated urix@0.1.0: Please see https://github.com/lydell/urix#deprecated
npm ERR! Unexpected end of JSON input while parsing near '...0-rc.2":{"name":"@bab'

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\Abhilash\AppData\Roaming\npm-cache\_logs\2020-05-06T11_17_51_094Z-debug.log

这是怎么回事?任何人都可以向我解释详细信息..我的错误是什么?

What is Going on ? Can anybody explain me details please..what is the mistake by me ?

推荐答案

尝试以相同的顺序使用这些命令-

Try using these commands in the same order-

      npm install vue
      npm cache clean --force
      npm install -g @vue/cli

这篇关于带有 npm install 命令的 Vue Javascript的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆