Skip to content

Instantly share code, notes, and snippets.

@kirisaki
Created February 4, 2020 06:28
Show Gist options
  • Save kirisaki/f591995da5bd8f21e7853aae92c5dc03 to your computer and use it in GitHub Desktop.
Save kirisaki/f591995da5bd8f21e7853aae92c5dc03 to your computer and use it in GitHub Desktop.
One CLI for webpack must be installed. These are recommended choices, delivered as separate packages:
- webpack-cli (https://github.com/webpack/webpack-cli)
The original webpack full-featured CLI.
We will use "npm" to install the CLI via "npm install -D".
Do you want to install 'webpack-cli' (yes/no): yes
Installing 'webpack-cli' (running 'npm install -D webpack-cli')...
npm WARN webpack-cli@3.3.10 requires a peer of webpack@4.x.x but none is installed. You must install peer dependencies yourself.
+ webpack-cli@3.3.10
updated 1 package and audited 1061 packages in 8.612s
found 0 vulnerabilities
{ Error: A package is trying to access another package without the second one being listed as a dependency of the first one
Required package: webpack-cli (via "webpack-cli")
Required by: webpack@npm:4.41.5 (via /home/kirisaki/devel/knights/.yarn/cache/webpack-npm-4.41.5-ec6f53e9d3-1.zip/node_modules/webpack/bin/)
Require stack:
- /home/kirisaki/devel/knights/.yarn/cache/webpack-npm-4.41.5-ec6f53e9d3-1.zip/node_modules/webpack/bin/webpack.js
at Object.makeError (/home/kirisaki/devel/knights/.pnp.js:17704:24)
at resolveToUnqualified (/home/kirisaki/devel/knights/.pnp.js:26567:35)
at resolveRequest (/home/kirisaki/devel/knights/.pnp.js:26644:27)
at Object.resolveRequest.maybeLog [as resolveRequest] (/home/kirisaki/devel/knights/.pnp.js:26712:26)
at Function.module_1.Module._resolveFilename (/home/kirisaki/devel/knights/.pnp.js:25942:34)
at Function.module_1.Module._load (/home/kirisaki/devel/knights/.pnp.js:25827:40)
at Module.require (internal/modules/cjs/loader.js:692:17)
at require (internal/modules/cjs/helpers.js:25:18)
at runCommand.then (/home/kirisaki/devel/knights/.yarn/cache/webpack-npm-4.41.5-ec6f53e9d3-1.zip/node_modules/webpack/bin/webpack.js:143:5)
at process._tickCallback (internal/process/next_tick.js:68:7)
code: 'MODULE_NOT_FOUND',
pnpCode: 'UNDECLARED_DEPENDENCY',
data:
{ request: 'webpack-cli',
issuer:
'/home/kirisaki/devel/knights/.yarn/cache/webpack-npm-4.41.5-ec6f53e9d3-1.zip/node_modules/webpack/bin/',
issuerLocator: { name: 'webpack', reference: 'npm:4.41.5' },
dependencyName: 'webpack-cli',
candidates:
[ 'webpack',
'@webassemblyjs/ast',
'@webassemblyjs/helper-module-context',
'@webassemblyjs/wasm-edit',
'@webassemblyjs/wasm-parser',
'acorn',
'ajv',
'ajv-keywords',
'chrome-trace-event',
'enhanced-resolve',
'eslint-scope',
'json-parse-better-errors',
'loader-runner',
'loader-utils',
'memory-fs',
'micromatch',
'mkdirp',
'neo-async',
'node-libs-browser',
'schema-utils',
'tapable',
'terser-webpack-plugin',
'watchpack',
'webpack-sources' ] },
requireStack:
[ '/home/kirisaki/devel/knights/.yarn/cache/webpack-npm-4.41.5-ec6f53e9d3-1.zip/node_modules/webpack/bin/webpack.js' ] }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment