npm WARN [email protected] requires a peer of [email protected] but none is installed. You must install

2050 단어 오답장
웹팩과 웹팩-cli를 설치할 때 발생하는 문제: npm WARN 웹팩[email protected] requires a peer of [email protected] but none is installed. You must install peer dependencies yourself.
질문 번역: NPMWA [email protected]하나 필요[email protected]를 참고하십시오.등가 의존항을 직접 설치해야 합니다.
원인: 설치 시 명령: npm install webpack-g npm install webpack-cli-g는 기본적으로 웹팩의 최신 버전을 설치하여 설치된 최신 비계인 웹팩-cli가 웹팩 버전과 일치하지 않아 설치 오류 해결:
  • 웹팩 설치 버전 지정:
  • 			npm install [email protected] -g
    
  • 웹 패키지 설치를 지정하는 버전은 다음과 같다:
  • 			npm install [email protected] -g
    
  • 설치 성공:
  • PS D:\developer\IdeaProjects\itcast-nodejs> npm install [email protected] -g
    D:\developer
    ode.js
    pm_modules\webpack -> D:\developer
    ode.js
    pm_modules
    ode_modules\webpack\bin\webpack.js npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules\webpack
    ode_modules\fsevents): npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"}) + [email protected] added 323 packages from 198 contributors in 27.276s PS D:\developer\IdeaProjects\itcast-nodejs> npm install [email protected] -g D:\developer
    ode.js
    pm_modules\webpack-cli -> D:\developer
    ode.js
    pm_modules
    ode_modules\webpack-cli\bin\cli.js > [email protected] postinstall D:\developer
    ode.js
    pm_modules
    ode_modules\webpack-cli > node ./bin/opencollective.js **Thanks for using Webpack! Please consider donating to our Open Collective to help us maintain this package.** Donate: https://opencollective.com/webpack/donate npm WARN [email protected] requires a peer of [email protected] but none is installed. You must install peer dependencies yourself. + [email protected] added 206 packages from 126 contributors in 18.13s
            
    

    좋은 웹페이지 즐겨찾기