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
5
votes
2 answers

Webpack invalid options object when using writeToDisk

I'm trying to use webpack for my web development project, but can't figure out how to use the writeToDisk option. Here's my webpack.config.development.js file: const { merge } = require('webpack-merge') const path = require('path') const config =…
natzzzz
  • 53
  • 1
  • 4
5
votes
2 answers

Webpack Unknown option '--display-error-details'

I am in the process of upgrading webpack from v4 to v5. I have started with upgrading webpack-cli, as explained in the doc. So when I run npx webpack --version I get webpack 4.46.0 webpack-cli 4.5.0 Now I try to run the following command : npx…
Istopopoki
  • 1,584
  • 1
  • 13
  • 20
4
votes
0 answers

How to Update Webpack

Here is how you update your webpack-cli for anyone else who was curious. This issue arose when I was creating a new JHipster project, and was having issues with npm start. First, check your version of webpack by running this command in the terminal…
Taylor
  • 119
  • 1
  • 1
  • 4
4
votes
1 answer

why webpack output is always main.js?

I have project with this structure: my-app/ ├─ node_modules/ ├─ dist/ ├─ src/ │ ├─ index.css │ ├─ index.js │ ├─ index.html ├─ package.json ├─ webpack.config.js My webpack.js is: const { Module } = require("webpack"); Module.exports = { …
ljuk
  • 701
  • 3
  • 12
4
votes
1 answer

webpack 5 display-modules option stopped working

In webpack 4 I was using --display-modules option of webpack-cli. I can also see it in the documentation. moving to webpack 5, my build started to fail with below error: [webpack-cli] Error: Unknown option '--display-modules' [webpack-cli] Run…
Noy Oliel
  • 1,430
  • 3
  • 13
  • 26
4
votes
1 answer

Rails 6.1.0 [webpack-cli] TypeError: Cannot read property 'plugins' of undefined

My Rails+Webpack app contanizered with Docker worked fine in 6.0.3.4 and with "webpack": "^4.44.1", "webpack-cli": "^3.3.9" After upgrade to 6.1.0 webpack-cli cannot read property 'plugins' (or 'config' or 'loaders') in the environment.js during…
s0rin
  • 127
  • 1
  • 9
4
votes
0 answers

`webpack serve` fails with "Error: Cannot find module '../../lib/webpack-cli'"

I'm trying to set up a project using webpack. When I try to serve it using webpack I get this: root@d690f9010746:~/chat-webapp# npm run serve > chat-webapp@1.0.0 serve /root/chat-webapp > webpack serve --config…
David Knipe
  • 3,417
  • 1
  • 19
  • 19
3
votes
1 answer

Kotlin multiplatform gradle task "jsRun" gives error "[webpack-cli] TypeError: cli.isMultipleCompiler is not a function"

I have a Kotlin multiplatform project with JVM and JS. When executing jsRun gradle task to start the webpack server, it fails with the following error: Waiting for changes to input files of tasks... (ctrl-d then enter to exit) [webpack-cli]…
Jordi
  • 2,055
  • 1
  • 16
  • 34
3
votes
1 answer

Vue 3 problem rendering child of the child components

I created a Vue 3.0.5 application using Webpack 5.21.2 and Webpack CLI 4.5.0. I build a global component my-component.js: import SecondComponent from './second-component.vue'; app.component('global-component', { template: `
Cananau Cristian
  • 436
  • 2
  • 6
  • 30
2
votes
2 answers

webpack-cli : Error: spawn Unknown system error -86 / Symfony6 / Mac M1

I have a mac with M1 chip and I wonder if the error is related to this, because on my old one I have no problem. % npm run dev > dev > encore dev Running webpack ... [webpack-cli] Error: spawn Unknown system error -86 at…
2
votes
0 answers

Webpack when run in terminal it gives an error `Error: Unknown option '--module-bind'`

I wanted to run Webpack using npm run build but it gives an error in the Terminal as bellow [webpack-cli] Error: Unknown option '--module-bind' [webpack-cli] Run 'webpack --help' to see available commands and options Error Image package.json { …
tcvduc
  • 129
  • 8
2
votes
3 answers

RangeError: WebAssembly.Instance(): Out of memory: wasm memory

When compiling assets using Laravel Mix, I am getting the below error. Steps I followed: Clone Laravel Git Install all node_modules using npm install Getting error when compiling assets using (npx mix or npm run dev/prod) I have already tried…
SW Dev
  • 53
  • 1
  • 1
  • 8
2
votes
3 answers

Hot reloading not working Rails 6 and webpacker 5.4.3 gem

I'm using Rails 6 and the webpacker 5.4.3 gem. I just recently upgraded several node packages and added one which broke hot reloading and can't determine why; these are the packages I've upgraded/added: @rails/webpacker. from 5.1.1 to…
2
votes
0 answers

webpack-cli SyntaxError: Invalid regular expression: /(\p{Uppercase_Letter}+|\p{Lowercase_Letter}|\d)(\p{Uppercase_Letter}+)/:

I'm trying to install the lastest version of webpack and the following message keeps coming back in my terminal. Screenshot after "npm start"
2
votes
1 answer

Should I use the webpack command or the webpack-cli command?

I understand that the webpack package and the webpack-cli package both need to be installed in order to use webpack commands. I understand that in webpack 3 there was just one package and it contained the command line functionality, but in webpack 4…
Kyle Delaney
  • 11,616
  • 6
  • 39
  • 66