Questions tagged [webpack-cli]

Webpack CLI is a CLI tool for providing a flexible set of commands for custom webpack projects. Use this tag for questions related with the command-line interface for webpack. Do not use for webpack in general.

Webpack CLI is a CLI tool for providing a flexible set of commands for developers to increase speed when setting up a custom webpack project. As of webpack v4, webpack is not expecting a configuration file but often, developers want to create a more custom webpack configuration based on their use-cases and needs. Exactly all these cases with webpack CLI we are providing a set of tools to improve the setup of custom webpack configuration. (1)

  1. Documentation
88 questions
0
votes
0 answers

Webpack-cli Cannot read properties of undefined (reading 'getArguments')

I'm getting this error: [webpack-cli] TypeError: Cannot read properties of undefined (reading 'getArguments') at WebpackCLI.getBuiltInOptions (/Users/rafa.mora/Sites/sender_id/node_modules/webpack-cli/lib/webpack-cli.js:831:77) at…
Rafael Mora
  • 1,095
  • 2
  • 13
  • 21
0
votes
0 answers

Why is webpack serve throwing the error "You need to install 'webpack-dev-server' for running 'webpack serve'" while the dependency is installed?

Problem: I am trying to start my react application by running npm run start. This then throws the error "You need to install 'webpack-dev-server' for running 'webpack serve'" while I have the dependency 'webpack-dev-server' already installed. What I…
A.Vandijck
  • 59
  • 1
  • 8
0
votes
1 answer

Is "this.getOptions is not a function" a bug for webpack?

I have a node.js backend project, and I use webpack to build it. "webpack": "^4.46.0", "webpack-cli": "^4.4.0" it reports error like Module build failed (from ./node_modules/babel-loader/lib/index.js): TypeError: this.getOptions is not a…
K.Yang
  • 9
  • 4
0
votes
0 answers

webpack-cli Error: Unknown option '--all'

When t try to run the command "npm run dev" i get the following error: [webpack-cli] Error: Unknown option '--all'. [webpack-cli] Error: Did you mean '--bail'?. [webpack-cli] Run 'webpack --help' to see available commands and options. I have…
Luis Estrada
  • 31
  • 1
  • 5
0
votes
0 answers

HookWebpackError: Debug Failure. False expression: Should only get Alias here. after TS-loader update

I updated to webpack (5.75.0) before 4.33.0, webpack cli (5.0.1) before 3.3.5 and typescript (4.9.5) from 4.1.2 and ts-loader(9.4.2) from 6.0.2, everything used to work fine before update, but now it returns to me this error
Alberto3
  • 35
  • 2
  • 4
0
votes
1 answer

webpack-cli Error: Conflict: Multiple chunks emit assets to the same filename

I am trying to generate my own webpack config and have some problems generate a bundle. Error: [webpack-cli] Error: Conflict: Multiple chunks emit assets to the same filename billing-dashboard-ui.js (chunks main and runtime) Changing my output…
AFAF
  • 569
  • 2
  • 16
  • 40
0
votes
0 answers

Webpack: UI Library's exports in index.ts are getting eliminated as unused exports?

I have my own ui library setup with webpack(v5.75.0) as the bundler. When it's built, all the exported components from src/index.ts (specified as entry file in webpack.config.js) are getting eliminated. As a webpack newbie, it feels like tree…
Dave
  • 405
  • 4
  • 17
0
votes
0 answers

webpack-cli is not in the npm registry

I am migrating from webpack 2 to webpack 4.46.0 and getting below error npm ERR! code E404 npm ERR! 404 Not Found - GET https://kvm-artifactor1.int.kronos.com/api/npm/npm/webpack-cli - not_found npm ERR! 404 npm ERR! 404 'webpack-cli@4.10.0' is not…
0
votes
1 answer

Invalid configuration object. Webpack has been initialized using a configuration object; devtool should match pattern

I am trying to implement webpack 5 with es6 syntax, but I'm coming up short even though i'm explicitly providing a devtool setting as per the documentation. Error Message: [webpack-cli] Invalid configuration object. Webpack has been initialized…
0
votes
2 answers

Vaadin 23: startup fails with "TypeError: cli.isMultipleCompiler is not a function"

I have a project with Vaadin 23.0.8 that fails to start with the error message "cli.isMultipleCompiler is not a function". It seems to be a compatibility problem with webpack-cli Version 4.9.2 which needs to be upgraded to 4.10.0
Chris
  • 834
  • 1
  • 10
  • 23
0
votes
0 answers

Getting error in webpack cli TypeError: webpack.optimize.UglifyJsPlugin is not a constructor

OS-> Windows 11 arch-> 64bigs language-> nodejs@v16.x.x Error:-> TypeError: webpack.optimize.UglifyJsPlugin is not a constructor > webpack && webpack-dev-server --hot --inline --port 8080 [webpack-cli] Failed to load 'E:\xxx\webpack.config.js'…
SANIKAVA
  • 11
  • 2
0
votes
1 answer

Webpack unknown option --display-optimization-bailout

I upgraded from webpack 3.3.1 to webpack-cli `4.10.01 I am getting build error with --display-optimization-bailout in the command
Akshay Vijay Jain
  • 13,461
  • 8
  • 60
  • 73
0
votes
0 answers

I can not import svg in react component with svgr/webpack package

I'm using @svgr/webpack package for loading svg and importing a svg in my react component like as this: import { close } from '../../../resources/icons/icon-close.svg'; This is my webpack.config file. require('dotenv').config(); const path =…
0
votes
0 answers

Laravel mix error development how repair?

Hello now get this all but i have error this: How repair error? I run command npm run dev [webpack-cli] Error: Cannot find module 'webpack/lib/rules/DescriptionDataMatcherRulePlugin' Require stack: -…
0
votes
1 answer

can't solve webpackcli invalid regular expression error

For my application when I'm trying to run the buildDev script from my package.json I am getting the error: [webpack-cli] SyntaxError: Invalid regular expression: /(\p{Uppercase_Letter}+|\p{Lowercase_Letter}|\d)(\p{Uppercase_Letter}+)/: Invalid…
lross15
  • 147
  • 2
  • 14