web-dev-qa-db-fra.com

npm nécessite un pair de

Mon projet vue cesse de fonctionner lorsque j'essaie d'installer un nouveau paquet via npm. J'étais en train d'installer axios.

J'ai d'abord eu

npm install
npm WARN [email protected] requires a peer of ajv@^6.0.0 but none is
  installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of webpack@^4.0.0 but none is
  installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of webpack@^4.0.0
  but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of webpack@^4.0.0 but
  none is installed. You must install peer dependencies yourself.

alors j'installe ces paquets,

npm install [email protected]  ajv@^6.0.0 [email protected]  webpack@^4.0.0 [email protected]  webpack@^4.0.0 [email protected]  webpack@^4.0.0 

Puis je reçois ces avertissements,

npm WARN [email protected] requires a peer of webpack@^3.1.0
  but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] 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.

qui me disent d'utiliser webpack 3

Alors j'ai couru,

npm install webpack@^3.1.0 [email protected] [email protected]

Ce qui me donne ensuite l'avertissement suivant, indiquant d'utiliser webpack4.

npm WARN [email protected] requires a peer of webpack@^4.0.0 but none
  is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of webpack@^4.0.0
  but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of webpack@^4.0.0 but none
  is installed. You must install peer dependencies yourself.

Comment puis-je résoudre ce problème?

Merci,

2
Shane G

Avez-vous essayé d'installer webpack@^4.0.0?

npm install webpack@^4.0.0
1
Rafaël Moser