programing

npm은 의 피어를 필요로 합니다.

kingscode 2022. 7. 10. 19:09
반응형

npm은 의 피어를 필요로 합니다.

npm에 새로운 패키지를 설치하려고 하면 vue 프로젝트가 작동하지 않습니다.엑시스를 설치하고 있었어요

처음 알게 된 건

npm install
npm WARN ajv-keywords@3.2.0 requires a peer of ajv@^6.0.0 but none is
  installed. You must install peer dependencies yourself.
npm WARN url-loader@1.1.1 requires a peer of webpack@^4.0.0 but none is
  installed. You must install peer dependencies yourself.
npm WARN webpack-dev-middleware@3.4.0 requires a peer of webpack@^4.0.0
  but none is installed. You must install peer dependencies yourself.
npm WARN webpack-dev-server@3.1.10 requires a peer of webpack@^4.0.0 but
  none is installed. You must install peer dependencies yourself.

그래서 그 패키지를 설치하고

npm install ajv-keywords@3.2.0  ajv@^6.0.0 url-loader@1.1.1  webpack@^4.0.0 webpack-dev-middleware@3.4.0  webpack@^4.0.0 webpack-dev-server@3.1.10  webpack@^4.0.0 

그리고 경고도 받고

npm WARN extract-text-webpack-plugin@3.0.2 requires a peer of webpack@^3.1.0
  but none is installed. You must install peer dependencies yourself.
npm WARN html-webpack-plugin@2.30.1 requires a peer of
  webpack@1 || ^2 || ^2.1.0-beta || ^2.2.0-rc || ^3 but
  none is installed. You must install peer dependencies yourself.

웹팩 3을 사용하라고 하는군요.

그래서 뛰어서

npm install webpack@^3.1.0 extract-text-webpack-plugin@3.0.2 html-webpack-plugin@2.30.1

그러면 웹 팩4를 사용하라는 다음과 같은 경고가 나타납니다.

npm WARN url-loader@1.1.1 requires a peer of webpack@^4.0.0 but none
  is installed. You must install peer dependencies yourself.
npm WARN webpack-dev-middleware@3.4.0 requires a peer of webpack@^4.0.0
  but none is installed. You must install peer dependencies yourself.
npm WARN webpack-dev-server@3.1.10 requires a peer of webpack@^4.0.0 but none
  is installed. You must install peer dependencies yourself.

어떻게 하면 이 문제를 해결할 수 있을까요?

고마워요.

webpack@^4.0.0을 설치해보셨습니까?

npm install webpack@^4.0.0

언급URL : https://stackoverflow.com/questions/53321300/npm-requires-a-peer-of

반응형