Error: Cannot find module 'webpack-cli/package.json'
Impossible d'installer webpack sur debian 11.0 (WSL).
sudo apt install nodejs npm
sudo npm install -g yarn webpack
yarn install
webpack
Error: Cannot find module 'webpack-cli/package.json'
Require stack:
- /usr/local/lib/node_modules/webpack/bin/webpack.js
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:815:15)
at Function.resolve (internal/modules/cjs/helpers.js:80:19)
at runCli (/usr/local/lib/node_modules/webpack/bin/webpack.js:65:26)
at /usr/local/lib/node_modules/webpack/bin/webpack.js:154:5
at processTicksAndRejections (internal/process/task_queues.js:97:5) {
code: 'MODULE_NOT_FOUND',
requireStack: [ '/usr/local/lib/node_modules/webpack/bin/webpack.js' ]
}
Voir le détail dans erreur_installation_webpack.txt
Modification effectuée par mcorne