All Questions
5,677 questions
0
votes
0
answers
24
views
Can't debug electron react boilerplate with Visual Studio Code on Windows
I'm starting a new Electron project using electron-react-boilerplate, but the debug of main process not working! I can debug correctly the render, all the debugger features are working, but for the ...
1
vote
0
answers
168
views
Failed to load PostCSS config: module is not defined in ES module scope
I'm encountering an issue with my PostCSS configuration in my project. When I try to run my development server, I receive the following error message:
Failed to load PostCSS config: module is not ...
0
votes
1
answer
25
views
Unable to increase max memory for Node and Webpack in my .NET Core App
I have been struggling with this for a while now and have been on through Goolgle and think the issue is that I need to use the --max-old-space-size= which I have tried in several different places but ...
0
votes
0
answers
47
views
Rollup Package Error: TypeError: Unable to determine current node version
I have built an npm package using Rollup, but after publishing and installing it in another project, I get the following error when running the project:
TypeError: Unable to determine current node ...
0
votes
0
answers
31
views
Encountering this issue "ERR_INVALID_FILE_URL_PATH: File URL path must be absolute" while running test suite
I am trying to set up Webpack locally and try to run the test,
yarn test
but it failed I don't know how to fix it. I am trying to set up Webpack locally and run its test suite, but I am encountering ...
0
votes
0
answers
62
views
Uncaught SyntaxError: I don’t have an export named ‘default’?
I'm encountering the following error in my console:
Uncaught SyntaxError: The requested module './dist/codemirrorbundle.js' does not provide an export named 'default' (at (index):22:16)
I've tried ...
2
votes
1
answer
98
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&...
0
votes
1
answer
71
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&...
0
votes
0
answers
41
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
...
0
votes
0
answers
39
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 ...
1
vote
0
answers
53
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....
0
votes
0
answers
58
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 ...
0
votes
0
answers
19
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) => { ... }
...
2
votes
1
answer
68
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 ...
0
votes
0
answers
71
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,...
1
vote
1
answer
111
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) ...
0
votes
0
answers
113
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 ...
1
vote
2
answers
97
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 { ...
1
vote
1
answer
124
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 ...
2
votes
1
answer
46
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
...
0
votes
0
answers
90
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 ...
0
votes
0
answers
43
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 ...
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&...
1
vote
0
answers
148
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 ...
0
votes
1
answer
58
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: ...
1
vote
0
answers
94
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/...
2
votes
0
answers
149
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 ...
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 ...
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 ...
0
votes
0
answers
27
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/...
-1
votes
1
answer
46
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 ...
0
votes
3
answers
145
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 ...
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/...
1
vote
0
answers
52
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: ...
2
votes
0
answers
138
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",
"...
0
votes
1
answer
149
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:
# ...
0
votes
0
answers
171
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 ...
1
vote
0
answers
40
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 ...
-1
votes
1
answer
177
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:...
0
votes
1
answer
201
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:- ...
1
vote
0
answers
19
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
package....
0
votes
0
answers
149
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 ...
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-...
0
votes
0
answers
35
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.
...
2
votes
1
answer
154
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 ...
-1
votes
1
answer
45
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("...
0
votes
0
answers
33
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 ...
0
votes
0
answers
189
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 ...
-1
votes
1
answer
108
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 ...
0
votes
0
answers
330
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&...