본문 바로가기
005 프로그래밍/Vue

[Vue-Error] vue cli 4 vulnerabilities (2 moderate, 2 high) 해결 방법, Vue 설치 에러

by Dallas 2022. 12. 15.
반응형

Vue CLI 설치 방법

 

1. NodeJs를 설치한다

2. Terminal에 다음의 코드를 입력한다

 

npm install -g @vue/cli

 

에러 해결

 

npm WARN deprecated source-map-url@0.4.1: See https://github.com/lydell/source-map-url#deprecated
npm WARN deprecated urix@0.1.0: Please see https://github.com/lydell/urix#deprecated
npm WARN deprecated source-map-resolve@0.5.3: See https://github.com/lydell/source-map-resolve#deprecated
npm WARN deprecated resolve-url@0.2.1: https://github.com/lydell/resolve-url#deprecated
npm WARN deprecated subscriptions-transport-ws@0.11.0: The `subscriptions-transport-ws` package is no longer maintained. We recommend you use `graphql-ws` instead. For help migrating Apollo software to `graphql-ws`, see https://www.apollographql.com/docs/apollo-server/data/subscriptions/#switching-from-subscriptions-transport-ws    For general help using `graphql-ws`, see https://github.com/enisdenjo/graphql-ws/blob/master/README.md
changed 847 packages, and audited 848 packages in 26s

64 packages are looking for funding
  run `npm fund` for details

4 vulnerabilities (2 moderate, 2 high)

To address all issues (including breaking changes), run:
  npm audit fix --force

Run `npm audit` for details.

 

위과 같이 4 vulnerabilities (취약점)이 있다는 안내 문구가 나오며 설치가 정상적으로 진행되지 않았다.

stackoverflow와 다른 QnA를 찾아보았을 때는, 설치나 프로젝트 생성에 지장이 있지 않다면 큰 문제가 아니라는 답변을 보아서, 설치를 계속해보려 한다.

 

 

npm audit fix --force

 

에러 안내문 밑에서 2번째 줄에 있는, npm audit fix --force를 Terminal에 입력해준다.

(오류를 포함하여, 강제로 설치를 모두 진행하는 구문으로 알고 있다)

 

 

설치가 완료되었다면, Terminal에 vue를 입력해본다.

아래와 같은 화면이 나온다면 vue/cli가 정상 설치된 것이다. 

 

Usage: vue <command> [options]

Options:
  -V, --version                              output the version number
  -h, --help                                 display help for command

Commands:
  create [options] <app-name>                create a new project powered by vue-cli-service
  add [options] <plugin> [pluginOptions]     install a plugin and invoke its generator in an already created project
  inspect [options] [paths...]               inspect the webpack config in a project with vue-cli-service
  serve                                      alias of "npm run serve" in the current project
  build                                      alias of "npm run build" in the current project
  ui [options]                               start and open the vue-cli ui
  init [options] <template> <app-name>       generate a project from a remote template (legacy API, requires @vue/cli-init)
  config [options] [value]                   inspect and modify the config
  outdated [options]                         (experimental) check for outdated vue cli service / plugins
  upgrade [options] [plugin-name]            (experimental) upgrade vue cli service / plugins
  migrate [options] [plugin-name]            (experimental) run migrator for an already-installed cli plugin
  info                                       print debugging information about your environment
  help [command]                             display help for command

  Run vue <command> --help for detailed usage of given command.

 

반응형

댓글