简体   繁体   English

Vue Javascript 和 npm 安装命令

[英]Vue Javascript with npm install command

I am new Vue JS learner.我是新的 Vue JS 学习者。 Wanted to install Vue and interested to create web application in that.想要安装 Vue 并有兴趣在其中创建 web 应用程序。 So,Globally added npm Vue所以,全局添加了 npm Vue

npm install --global vue-cli

This gives me:这给了我:

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

Later I created new project by后来我创建了新项目

vue init webpack my-project

this created some folders and files (Also Package.json)这创建了一些文件夹和文件(还有 Package.json)

Later as per procedure given cmd as:稍后按照给定 cmd 的程序为:

cd my-project
npm install

This Gives Errors as:这会导致错误:

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

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM