Skip to main content

All Questions

Tagged with
Filter by
Sorted by
Tagged with
2 votes
1 answer
76 views

Can't resolve 'querystring' in old dependency

I have an old React app which I'm trying to run locally, but I encountered some issues regarding querystring and pollyfils. Here are my files: packages.json: { "name": "test-immersion&...
terett's user avatar
  • 463
0 votes
1 answer
46 views

laravel-mix and webpack: command not found

I'm working on resurrecting an older Laravel application. My package.json is non-controversial: { "private": true, "scripts": { "dev": "npm run development&...
Tench's user avatar
  • 527
0 votes
0 answers
29 views

webpack-cli TypeError: Cannot read properties of undefined (reading 'getArguments')

I am trying to deploy my application and getting this error. Locally it is working perfectly fine here is the complete stack trace: 2025-02-20T09:20:27.0519522Z > [email protected] build ...
Adil Mughal's user avatar
0 votes
0 answers
37 views

Dynamically loading NodeJS modules on Lambda using webpack

I'm struggling to dynamically load modules when running a NodeJS service on Lambda after bundling the service with webpack. This runs fine locally when I run transpiled TypeScript directly out of my ...
Greg's user avatar
  • 2,609
1 vote
0 answers
42 views

React 19 HMR: weird bugs in a hello-world project

1st issue: The error gets shown right before the HMR reloads (not updates) the page after changes are made. 2nd issue: HMR reloads the page instead of updating trivial components (App). ./package....
ikerya's user avatar
  • 137
0 votes
0 answers
52 views

Trying to use get images to be loaded by CSS url in Electron

I am having trouble implementing any information I can find about how to get my CSS to work under Electron where it has background-image w/ url classes. At this point, I have an import statement in my ...
Trant's user avatar
  • 3,611
0 votes
0 answers
17 views

DEP_WEBPACK_EXTERNALS_FUNCTION_PARAMETERS DeprecationWarning

npm run dev cause warning in terminal (node:34120) [DEP_WEBPACK_EXTERNALS_FUNCTION_PARAMETERS] DeprecationWarning: The externals-function should be defined like ({context, request}, cb) => { ... } ...
NewBee's user avatar
  • 9
2 votes
1 answer
54 views

How to exclude json file from my webpack bundle?

I build my project with wepback, but cant seem to exclude my json file from it. I am using node.js and trying to store the path of the json file like this, and this codeblock is inside my index.js ...
Ianor Elgar's user avatar
0 votes
0 answers
45 views

Error: Emit attempted before Angular Webpack plugin initialization

I have an angular app and recently it started giving the error mentioned below. I tried to research online but there is minimal information on the web on this issue. I have tried disabling ivy and aot,...
zee123's user avatar
  • 1
1 vote
1 answer
64 views

"ReferenceError: exports is not defined" after update to Node 22.12 from Node 22.11

After I upgraded our project from Node 22.11 to Node 22.12, I am unable to build and run the project using webpack. Problem is caused by Node 22.12 and its newly introduced functionality require(esm) ...
Bedřich Schindler's user avatar
0 votes
0 answers
63 views

Changes to the project.json file in an Nx monorepo doesn't reflect on Nx CLI behaviour

I have set up an Nx monorepo for a Nest.js Standalone. I noticed that when I changed my project.json configurations to change Nx Commands and add modes (Dev, Prod) so I toggle optimization in webpack ...
Raed Addala's user avatar
1 vote
2 answers
72 views

How to configure webpack to exclude certain modules from a library?

I have a React app that imports a library (in the node_modules directory, of course). The name of the library is @lib/schema. In the react app, modules of this library are imported like so: import { ...
Bear Bile Farming is Torture's user avatar
1 vote
1 answer
87 views

How to use segfault-handler? Is It Still Usable with Node 20.x

Facing an issue when trying to use the package segfault-handler with Node.js 20.15.0. When working on a Linux VM, I encountered segmentation faults during build and bundle processes with webpack. To ...
Umesh's user avatar
  • 11
2 votes
1 answer
45 views

Bitbucket ci cd sh: 1: webpack: not found

I am trying to setup ci cd for my react project using bitbucket pipeline. The react project setup is done using webpack. But for some reason same is not working on bitbucket. Below is my package json ...
tyler's user avatar
  • 311
0 votes
0 answers
64 views

NestJs HMR not working with "type": "module"

I followed NestJs HMR using webpack using following url. https://docs.nestjs.com/recipes/hot-reload It works fine when we use "type": "commonjs" in package.json. Unfortunately I ...
Anonymous Creator's user avatar
0 votes
0 answers
40 views

Electron Update : Uncaught ReferenceError: global is not defined

We are trying to update node from 12 to 20 and electron version from 11 to 31. I have an Electron based application. we do webpack in the render process. It throws error when I run the app after ...
Mohan Krishna's user avatar
0 votes
1 answer
28 views

Use Import and Require to import JSON impact on the construction time of Webpack, vue cli5

I have a repo that built by vue/cli5 for vue3. I also use vue-i18n here. The main. import { createApp } from "vue"; import App from "./App.vue"; import router from "./router&...
greenbird's user avatar
1 vote
0 answers
121 views

"[ERR_REQUIRE_ESM]: require() of ES Module" error in TypeScript + Webpack + webpack-node-externals case

Although this error is quite widespread, this solution is technology stack dependent (even with TypeScript/JavaScript various technologies could be used). This question is narrowly specialized on ...
Takeshi Tokugawa YD's user avatar
0 votes
1 answer
36 views

how to resolve the issue "Error message "error:0308010C:digital envelope routines::unsupported""

Trying to build a pipeline using Azure devops pipeline but ran into the issue Error : 0308010C:digital envelope routines::unsupported. npm version: 10.8.2 node version: v18.20.5 openssl version: ...
reel Media's user avatar
1 vote
0 answers
75 views

Please install sqlite3 package manually

I get an npm error from the sequelize module when running the project via node: "start": "node build/scripts/main.js" webpack-internal:///../../node_modules/sequelize/lib/dialects/...
Тимур's user avatar
2 votes
0 answers
133 views

Build cache files are corrupted while trying to run million lint with next

VERSIONS Next.JS: 14.2.3\ React: ^18 NodeJS: 23.3.0/win11/arm64 DESCRIPTION Recently I saw a linter which helps you optimize your react code and decided to connect it to my Next.JS project. According ...
Lvasche's user avatar
  • 529
0 votes
0 answers
18 views

Bundle TS code with Webpack without compiling it to JS

I am using Webpack to bundle node.js app so I won't need to deploy node_modules to my serverless infrastructure. Since Node.js 22 (LTS) officially supports Typescript, it now makes sense to only ...
Vololodymyr's user avatar
  • 2,288
0 votes
0 answers
13 views

How to determine machine environment when running a Webpack command with a given environment parameter?

I stumbled upon an issue while determining the actual environment of the Webpack project I'm working on. When the project gets deployed to a testing or production environment, a different file path is ...
sd_master92's user avatar
0 votes
0 answers
26 views

__dirname give the wrong path

Trying to use __dirname in webpack, the project path is like /home/myname/workplace/projectname but console.log(`__dirname: ${__dirname}`); returned: __dirname: /local/home/myname/workplace/...
Vision's user avatar
  • 111
-1 votes
1 answer
42 views

npm run production stops at 43 percent

I'm working on this codebase that's using laravel mix and laravel 10. npm run dev, development, watch and even hot are all running fine but npm run production stops at 43%. I've tried all the ...
Sixtus Agbo's user avatar
0 votes
3 answers
127 views

How to approach minification of HTML literals inside JS bundle [closed]

I have a small node app using webpack and babel to render the production JS -- generate an optimised and minified js bundle. In the source JS, for clarity and easy maintenance, I have HTML literals ...
Matt Rek's user avatar
  • 1,831
0 votes
0 answers
20 views

Add node modules to Webpack virtually

https://www.npmjs.com/package/webpack-virtual-modules var virtualModules = new VirtualModulesPlugin({ 'node_modules/module-foo.js': 'module.exports = { foo: "foo" };', 'node_modules/...
Jaspreet Singh 's user avatar
1 vote
0 answers
50 views

Module parse failed: Unexpected token (1:3)

I build a SSR project using webpack and it runs totally fine. But when I apply SCSS in my project, it give me an error: ERROR in ./src/client/styles/Calculator.scss 1:3 Module parse failed: ...
TranCongBinh's user avatar
2 votes
0 answers
131 views

Sentry with WebPack results in no source context on Sentry

UPDATE: My sourcemap https://pastebin.com/vj3EHTMV PS. I have just added inlineSources to true on tsconfig.json { "$schema": "https://json.schemastore.org/tsconfig", "...
Rodrigo's user avatar
  • 411
0 votes
1 answer
115 views

Environment variables not working with Webpack Encore in Docker container [closed]

I've got a Symfony project with Webpack Encore. MySQL, PHP, Mercure, Yarn/NodeJS, etc. are installed on my machine. Environment variables are accessible by my front-end code. Relevant code snippets: # ...
Stephan Vierkant's user avatar
0 votes
0 answers
132 views

Nextjs 14 chunks not loading in prod build

I have a nextjs 14 application which I need to deploy to k8s. We've built a docker image from nextjs docs and deployed it to our DO cluster. When trying to access the application, some chunks are not ...
Michael's user avatar
  • 1,096
1 vote
0 answers
39 views

Preventing Webpack Build Process from Deleting Optimized Images in Custom Gutenberg Blocks Plugin

I'm developing a custom Gutenberg blocks plugin and have integrated an image optimization process into my workflow. I'm using sharp in a custom Node.js script to generate optimized WebP versions of ...
dev_freeman_12's user avatar
-1 votes
1 answer
119 views

Error: read ECONNRESET problem when using yarn to start a React project

when I do 'yarn start' with my project this error always occurs: node:events:491 throw er; // Unhandled 'error' event ^ Error: read ECONNRESET at TLSWrap.onStreamRead (node:...
Max Harano's user avatar
0 votes
1 answer
150 views

ionic capacitor error:- ERR_OSSL_EVP_UNSUPPORTED | digital envelope routines

I am facing issue on ionic build error after updating to node v18.20.4, It was working fine with node v16.20.2. I tried below options with no luck 1) set NODE_OPTIONS=--openssl-legacy-provider Note:- ...
Deepak Dholiyan's user avatar
1 vote
0 answers
18 views

Multiple Node.js builds in different subfolders with different node versions with one command possible?

I'm working on a project, a WordPress plugin for the Divi theme, with the following file structure: root gulpfile.js package.json /src/divi4 gulpfile.js package.json /src/divi5 gulpfile.js ...
xxtesaxx's user avatar
  • 6,429
0 votes
0 answers
109 views

"Failed to resolve module specifier 'events'." when bundling node modules with esbuild and esbuild-deno-loader [DENO 2]

I'm building a Chrome extension, using Deno to manage my node_modules, and esbuild-deno-loader to bundle the modules into a local file, since Chrome extensions do not allow external dependencies. The ...
whitmank's user avatar
0 votes
0 answers
7 views

chunk.sortModules is not a function when running yarn run encore production in symfony project

i Just run $yarn run encore production i have this error: TypeError: chunk.sortModules is not a function at /var/www/ppd2_orientation-paysdelaloire_f/livraisons/symfony/node_modules/@symfony/webpack-...
kimcode's user avatar
0 votes
0 answers
31 views

WebPack imports externals with CommonJS instead of ES6

Application description Express application using webpack to get bundled Problem Can't bundle app because dependencies (i.e. webpack's externals) are imported using CommonJS instead of ES modules. ...
R1D3R175's user avatar
  • 190
2 votes
1 answer
128 views

Absolute path after building app by webpack with webtorrent and electron

I have an app with electron forge, webtorrent and webpack. I created it using 2 commands: npm init electron-app@latest my-app -- --template=webpack yarn add webtorrent Add import to main.js import ...
Inventor's user avatar
  • 174
-1 votes
1 answer
41 views

Error using Electron's ipcRenderer on a ReactJS app with Socket.IO

I have a scenario with a Electron Forge application together with ReactJS and Socket.IO: preload.js: import { contextBridge, ipcRenderer } from "electron"; window.addEventListener("...
Mendes's user avatar
  • 18.5k
0 votes
0 answers
32 views

Webpack issue Uncaught ReferenceError: require is not defined

I'm working on converting my React Native app to support both mobile web and desktop web using react-native-web. I've set up webpack and made necessary changes to my babel.config.js, but I am ...
aman upadhyay's user avatar
0 votes
0 answers
160 views

yarn build Error - Module parse failed: Unexpected token

I ran yarn build as usual, but I encountered the following error: ./node_modules/@mui/base/unstable_useModal/useModal.js 107:28 Module parse failed: Unexpected token (107:28) File was processed with ...
Minju Hwang's user avatar
-1 votes
1 answer
84 views

NextJS symlinks not updating and crashing the application in Kubernetes deployment

Intro I have Kubernetes deployment of a NextJS app, I want to run the app in development mode so that updating a file causes the application to hot-reload immediately, in particular I want to update ...
Fral's user avatar
  • 31
0 votes
0 answers
303 views

Storybook with Next.js and Webpack 5 cannot resolve various node modules

I'm trying to create a Storybook project with Next.js and webpack 5. I have a few decorators in my preview.tsx: import type { Preview } from "@storybook/react"; import React from "react&...
Ethan's user avatar
  • 1,686
1 vote
1 answer
127 views

Upgrading Webpack with npm and Angular

This question follows my last one. I am upgrading a legacy Node/Angular application (10 years old!) and have got everything compiled without error messages, etc. I am using an index.html folder at the ...
peter's user avatar
  • 357
1 vote
0 answers
66 views

Upgrading Node/npm dist configuration

I have a ten-year old Node application which I am now (at long last) upgrading to the latest packages. I have finally got everything compiled without error, and the reward is that npm creates a new ...
peter's user avatar
  • 357
0 votes
0 answers
71 views

Using store.dispatch in a Cypress test causes a webpack loader error

I am trying to use store dispatch in a Cypress test but I have a webpack loader error... I'm using craco with react 18.2 and cypress 13.14.2 my config : index.ts if ((window as any).Cypress) { (...
David MOSCA's user avatar
0 votes
0 answers
287 views

Can't run project due to: Cannot read properties of undefined (reading 'prototype')

When I try to run my react application, I'm running into the following error: Uncaught TypeError: Cannot read properties of undefined (reading 'prototype') at ./node_modules/probe-image-size/lib/...
user27293997's user avatar
1 vote
1 answer
87 views

Webpack: Module not found: Error: Can't resolve <node.js-package>

I am trying to package my first vscode extension that I have tested under debugger. In package.json, in scripts list, I have added the line "package": "webpack --mode production --...
PCh's user avatar
  • 199
0 votes
1 answer
43 views

Electron React App with Express Backend Works in Development but Not After Build (Requests Pending)

I built an Electron app using React and bundled it with Webpack. The backend is built using Express.js, and during development (npm start), everything works perfectly—the backend starts and handles ...
Oussama's user avatar
  • 31

1
2 3 4 5
114