Vue Javascript с командой npm install - PullRequest
0 голосов
/ 06 мая 2020

Я новый Vue JS ученик. Хотел установить Vue и хотел создать на нем веб-приложение. Итак, глобально добавлено 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)

Позже в соответствии с процедурой, заданной cmd как:

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

Что такое Продолжается ? Кто-нибудь может объяснить мне подробности .. в чем я ошибаюсь?

1 Ответ

0 голосов
/ 01 августа 2020

Попробуйте использовать эти команды в том же порядке -

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