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
2
votes
1 answer

webpack-cli 5 custom comand line params not working

I am upgrading webpack 4 to 5. In package.json I had: start": "webpack-dev-server --config config/webpack.js --mode development --cssExtract --uiTest --progress --color --port 2000 --open" after an upgrade I got: [webpack-cli] Error: Unknown…
Edgaras Karka
  • 7,400
  • 15
  • 61
  • 115
2
votes
0 answers

webpack serve: liveReload flag doesn't work

Packages: "node": "14.14.0, "npm": "6.14.8", "webpack": "^5.10.0", "webpack-cli": "^4.2.0", I was trying to use example from https://webpack.js.org/configuration/dev-server/#devserverlivereload without effects... My…
Drego31
  • 21
  • 2
2
votes
1 answer

How to solve npm run dev

Im trying to install npm for first time. When I run npm install, then npm run dev, it say webpack-cli must install. After I install it, I got this error: C:\Users\Lokman02Naza\Documents\laravel\pizzahouse> npm run dev dev npm run…
Lokman
  • 33
  • 1
  • 2
  • 6
2
votes
3 answers

Webpack is not failing on TypeScript error

Since I upgraded to version 5, webpack does not fail on a TypeScript error. Here is my scenario: index.ts (entry point): const message: string = "Hello World"; console.log(message); I run ./node_modules/.bin/webpack --config webpack.config.js…
oliverpk
  • 21
  • 1
  • 4
2
votes
0 answers

Webpack-cli for Laravel mix needed?

I took a look at Laravels official package.json to update mine which goes back to Laravel 5.4. Mine looked like this and I updated it to look like this. I removed node, webpack and webpack-cli, because apparently it is not needed? However, I get…
Hillcow
  • 890
  • 3
  • 19
  • 48
1
vote
1 answer

webpack-cli TypeError ERR_INVALID_ARG_TYPE: The "path" argument must be of type string. Received an instance of Array

[webpack-cli] TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received an` instance of Array at new NodeError (node:internal/errors:399:5) at validateString (node:internal/validators:163:11) at…
1
vote
0 answers

Webpack and Webpack-cli compatibility issues

I upgraded webpack from 5.70.0 to 5.75.0 my webpack-cli is at 4.9.2 When I try to npm install my project it crashes saying: npm ERR! notarget no matching version found for webpack-cli@5.0.1 The company I work for uses their own artifactory where the…
1
vote
1 answer

Library dotenv-webpack doesn't work with vue 3 and webpack-cli

I'm using Vue 3 and Webpack 5 and wanted to install dotenv-webpack, but I can't get it to work. Here's full code: https://github.com/golebiewska-n/webpack5-vue3 Setup: package.json script I'm using to launch the app webpack-cli…
1
vote
1 answer

@ngtools/webpack AngularWebpackPlugin error when going from Angular 12 to Angular 13

I have a large Angular 12 application that uses Webpack 5.55.1, not the Angular CLI. When I tried to upgrade from Angular 12.2.16 and @ngtools/webpack 12.0.5 to Angular 13.3.11 and @ngtools/webpack 13.3.9 I get a webpack-cli error as shown below…
jurgen w
  • 243
  • 1
  • 2
  • 14
1
vote
1 answer

Getting error in console Uncaught ReferenceError: arguments is not defined after upgrading the webpack 4 to webpack 5

Getting error in console Uncaught ReferenceError: arguments is not defined after upgrading the webpack 4 to webpack 5. This arguments is in debounce funtion
1
vote
2 answers

Cannot GET / - localhost 8080 not working with webpack dev server

I have been following this tutorial online: https://www.youtube.com/watch?v=TOb1c39m64A. I am about 10 minutes in, where we are starting the webpack dev server for the first time. I do this and when I travel to: http://localhost:8080/ I receive a…
user16612582
1
vote
1 answer

Why does webpack not like React.StrictMode

When I run npx webpack-cli --analyze --node-env development I get an error about it not liking : Webpack Bundle Analyzer is started at http://127.0.0.1:8888 Use Ctrl+C to close it Hash: 24852f2f5b5cef02cfe2 Version: webpack…
Randy
  • 1,137
  • 16
  • 49
1
vote
0 answers

Rebuild with visual studio and webpack-cli does not build my jsx file

I was following this two tutorials to create my first react app and node.js: Doc Microsoft(The worst doc in MS I have ever seen) Medium.com This one helped me to build a working site. I am using visual studio 2019 (not an optional.. so please no VS…
Simone
  • 2,304
  • 6
  • 30
  • 79
1
vote
2 answers

TypeError: Cannot read property 'name' of undefined at new WebpackCLI

I'm trying to run yarn dev in my project and nothing happen, just display this error below: [webpack-cli] TypeError: Cannot read property 'name' of undefined at new WebpackCLI…
Mikael
  • 329
  • 4
  • 10
1
vote
0 answers

Getting webpack error after update to version 5 from 3

I recently moved from webpack 3 to 5 and made some changes as per the suggestions, however after this upgrade, build fails and server won't start. here is my webpack file const path = require('path') const webpack = require('webpack') const glob =…
Amit Pandey
  • 274
  • 4
  • 16