Installation fails; Error: Cannot find module ‘webpack-cli’

ubuntu@ip-172-31-21-95:/empty_truffle$ uname -a
Linux ip-172-31-21-95 4.4.0-1057-aws #66-Ubuntu SMP Thu May 3 12:49:47 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
ubuntu@ip-172-31-21-95:
/empty_truffle$
ubuntu@ip-172-31-21-95:/empty_truffle$
ubuntu@ip-172-31-21-95:
/empty_truffle$ sudo webpack
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.
  • webpack-command (https://github.com/webpack-contrib/webpack-command)
    A lightweight, opinionated webpack CLI.
    We will use “npm” to install the CLI via “npm install -D”.
    Which one do you like to install (webpack-cli/webpack-command):
    webpack-cli
    Installing ‘webpack-cli’ (running ‘npm install -D webpack-cli’)…
    npm WARN ubuntu@1.0.0 No description
    npm WARN ubuntu@1.0.0 No repository field.
    npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.4 (node_modules/fsevents):
    npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.4: wanted {“os”:”darwin”,”arch”:”any”} (current: {“os”:”linux”,”arch”:”x64″})
  • webpack-cli@3.0.2
    updated 1 package and audited 6259 packages in 4.81s
    found 0 vulnerabilities

{ Error: Cannot find module ‘webpack-cli’
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:594:15)
at Function.Module._load (internal/modules/cjs/loader.js:520:25)
at Module.require (internal/modules/cjs/loader.js:650:17)
at require (internal/modules/cjs/helpers.js:20:18)
at runCommand.then (/usr/lib/node_modules/webpack/bin/webpack.js:149:5)
at process._tickCallback (internal/process/next_tick.js:68:7) code: ‘MODULE_NOT_FOUND’ }

Author: Fantashit

2 thoughts on “Installation fails; Error: Cannot find module ‘webpack-cli’

Comments are closed.