42,425 questions
0
votes
1
answer
66
views
Next.js webpack error on first run (port 3000) but works on second run (port 3001)
Problem
I'm experiencing a strange behavior with my Next.js 14 project. When I first run npm run dev, the app starts on localhost:3000 but shows a webpack error. However, if I run npm run dev again (...
Tooling
1
vote
6
replies
57
views
Large build size for Electron app using vite and electron-builder due to node_modules
I have an Electron app that I build using webpack + electron-forge. I consider to migrate to vite + electron-builder. The migration succeeded quite smoothly, and dev experience with vite is way better ...
1
vote
3
answers
111
views
Content not displaying in div using webpack
I am trying to print text and an image to a div using webpack but it does not seem to be working. Only the buttons display but the text and the image does not. Please can you take a look at my code ...
Tooling
0
votes
1
replies
74
views
Workbox service-worker with turbopack in production (next 16)
I want to create PWA that works offline (cache static assets, API requests, images, etc) and using PWABuilder make a native mobile app for android and IOS at once.
My tech stack:
- [email protected]....
1
vote
0
answers
83
views
Implementing a Chrome extension using Angular 21 and TypeScript [duplicate]
I’m trying to implement a chrome extension using Angular21. I need to compile background script, that is written using TypeScript. For this I need to compile background script inside Angular build. I ...
-1
votes
1
answer
108
views
Webpack and Ts-loader cannot generate a proper ESM JavaScript code to import a module and run it in Node
I am trying to convert a TypeScript file (test.ts) into an ESM JavaScript file (bundle.js) via webpack, ts-loader, and node (from NodeJS). For this purpose, I created a webpack.config.js and tsconfig....
1
vote
0
answers
119
views
webpack's bundle is pointing to typescript module.ts, instead of transpiling first to module.js and referencing to module.js
I have a main src/app.ts file in which i import a ./src/my-module.ts file.
The bunlde file ./dist/app.bundle.js (that i get after executing webpack command) still references to ./src/my-module.ts.
...
3
votes
2
answers
91
views
How to configure webpack with MiniCssExtractPlugin to avoid small js chunks?
In our webpack configuration we use MiniCssExtractPlugin to extract style to separate static files, it works fine, but when we use dynamic import for css it generates two files: one css and another js....
0
votes
0
answers
61
views
Error when wrapping import function in nodejs
I have the following code:
src/main.js
const importModule = async (moduleName) => {
const mod = await import(moduleName);
return mod;
};
const fs1 = await import("fs");
const fs2 = ...
1
vote
1
answer
117
views
Module not found: TypeError: Cannot read properties of undefined (reading 'tap'), The loader "./.component.scss" didn't return a string
I recently upgraded a microfrontend project built with Single-SPA and Angular from version 13 to Angular 18. After the migration, I noticed that the styles are completely broken or not loading as ...
1
vote
0
answers
43
views
Resolving “You may need a suitable loader to handle this file type” in Electron environments
I added firebase-electron to my Vue CLI Plugin Electron Builder project using yarn, but I encountered the following error.
I'm using Webpack 4.43.0.
How can I resolve this error?
error in ./...
0
votes
1
answer
79
views
How to integrate Vue.js 3 with SPFx 1.21.1?
I'm trying to develop my first SPFx (1.21.1) web part using Vue (3.5.22) without success. This is my package.json:
{
"name": "spfx",
"version": "0.0.1",
&...
0
votes
0
answers
65
views
Modern scss variable inheritance
We need to modernize our theme to avoid deprecations and security issues. As such, we are upgrading many node packages including webpack and sass. I'm having some trouble with inheritance.
I am very ...
0
votes
0
answers
45
views
onnxruntime-node native binding not found when packaging with pkg — need official way to load from custom path
I'm trying to bundle a Node.js CLI tool that uses @xenova/transformers into a single executable using pkg.
The build works fine, but when I run the packaged executable, I get this error:
Error: Cannot ...
2
votes
0
answers
38
views
Runtime Webworker errors after upgrade from angular 15 to angular 20
We are using webworkers that started throwing runtime exceptions in our prod bundles after the upgrade.
We're creating the worker with:
new Worker(new URL('.worker/worker', import.meta.url)
The error ...
1
vote
0
answers
93
views
Nx/NestJS - Empty dependencies list on package.json after build
I'm trying to create a Nx workspace(monorepo) with a NestJS app inside it (I'm fairly new to both Nx and Node.js/NestJS ecosystem).
I run the following command to create a new Nx workspace.
npx create-...
0
votes
0
answers
39
views
Trouble getting WSO2 apim-apps (admin portal) to run locally on my system for contributing
When I run the admin portal of apim-apps, webpack compilation get succeeded but browser says cannot GET /admin. Publisher portal works and devportal also gives the same error.
Here's what I did
Got ...
0
votes
1
answer
29
views
Pug html loader & Webpack loader Error in Aurelia project
I'm experiencing an issue after attempting to upgrade some of my packages.
ERROR in ./src/tasks/tasks.jade
Module build failed (from ./node_modules/pug-html-loader/lib/index.js):
Error: A valid query ...
2
votes
1
answer
157
views
Angular DevServer: Webpack-dev-middleware ENOENT: No such file or directory Error
When trying to start an Angular development server, I'm encountering a webpack-dev-middleware error:
<e> [webpack-dev-middleware] Error: ENOENT: no such file or directory, '.'
<e> at ...
0
votes
2
answers
61
views
`core-js` with `@babel/preset-env` adds unnecessary polyfills and bloats bundle
I’m working on a web project built from an enterprise scaffold using webpack v5 and Babel. The target environment is Chrome ≥ 138 only.
However, I’ve noticed that the build includes unnecessary ...
1
vote
0
answers
34
views
How to use webpack to split chunks in this scenario
I have a single-page web application which started off small, and so code splitting was a complexity too far.
It has since grown and now has lots of pages, and most pages have some library ...
0
votes
0
answers
108
views
npm run build not working for the specific Next.js project
Creating an optimized production build ...
glob error [Error: EPERM: operation not permitted, scandir 'C:\Users\LENOVO\Application Data'] {
errno: -4048,
code: 'EPERM',
syscall: 'scandir',
...
0
votes
0
answers
45
views
How to remove 'unsafe-eval' from CSP in legacy ASP.NET Core 3.1 MVC + Angular 12 project using MVC and JIT compilation?
I have a legacy project developed with ASP.NET Core 3.1 MVC and Angular 12 (originally it was Angular 5).
I need to set a Content Security Policy (CSP) for the website without using 'unsafe-val' to ...
0
votes
0
answers
130
views
Getting node related errors when using pptxgenjs latest version in NX Angular Microfrontend setup
I am using NX Angular microfrontend application. @nx/angular: 20.8.0, Angular: 19.28
I am trying to use pptxgenjs: 4.0.1 in my application. During build I am getting following error:
node:fs - Error: ...
0
votes
0
answers
42
views
loading.tsx and React Suspense are not triggered for _rsc requests in Next.js 15.2.1
I'm using Next.js 15.2.1 with the App Router.
I noticed that when I navigate to a page, my loading.tsx file is not triggered, and neither is React Suspense, if the page makes an _rsc request.
For ...
0
votes
0
answers
70
views
Importing a module federated web component inside a Next.js app
I'm a newbie to Next.js and module federation, and I'm working on an exercise (let's call it that) where I have a web component bundled with Webpack 5 in a federated module, and I want to import it ...
0
votes
1
answer
89
views
Issue while loading primeicons css resources into shadow dom
I would like to properly load css and icons into my web component, right now styles are loaded but icons are not. Here is my web component:
import React from "react";
import { createRoot } ...
0
votes
0
answers
55
views
webpack aliasing fails in NextJS + ts app
While working on a modular Next.js-13 app, I ran into one persistent challenge: plugin-based component overrides.
The Setup
We structured the app like this:
/components/singleNews
/plugins/social-...
0
votes
0
answers
211
views
Conflict between lodash.js and underscore.js
I am working on integrating a plugin into my application which resulted in lodash.js and underscore.js conflict. I have underscore.js implemented in my entire application and this plugin which I am ...
0
votes
0
answers
55
views
Terser webpack error while building next.js project
I get these errors when I try to build my nextjs project
static/chunks/36443.1f4a0592caf86eec.js from Terser
invalid unicode code point at line 1 column 454144
I tried removing node_modules and ...
0
votes
1
answer
81
views
NextJS ISR with Dynamic Components due to URL structure
I'm working on a project using Next.JS. It is an ecommerce site that uses URL slugs for every page. A slug is mapped to a specific page (Product, Article, Category). The project has the following ...
0
votes
1
answer
87
views
Next.JS monorepo not loading correct assets when switching zones (Loading Chunk Error)
I have multiple projects set up in a monorepo. I load all of them and browse out to Shared to load the initial layout. However, when I click a link to go to a different zone/app Customer, I receive ...
-1
votes
2
answers
172
views
I can't build my application with npm for a production build - webpack error [closed]
In my Nextjs application, every time I run “npm run build”, I get the following message:
Optimized production version is being created... glob error
[Error: EPERM: Operation not permitted, scandir
...
1
vote
1
answer
129
views
How to build multiple HTML entry points with TypeScript injection and nested output folders in Vite?
Background
I'm migrating a complex multi-page application from Webpack to Vite. Each HTML file has a corresponding .ts script, and the files live in nested directories.
Note: These entry HTML and TS ...
2
votes
1
answer
377
views
Why does Angular 18 (ESBuild) generate so many initial chunks after migrating from Angular 14?
I recently migrated my project from Angular 14 to Angular 18, and I’m noticing a huge increase in the number of initial chunks generated during the production build using ESBuild.
In Angular 14 (with ...
1
vote
0
answers
85
views
Next.js 15 + Turbopack build fails when importing SVGs via svg/weback, works on localhost
I'm using Next.js 15 with Turbopack, and I’m running into an issue when importing SVG icons using the svg/weba loader.
Everything works perfectly in development mode on localhost, but when I try to ...
1
vote
0
answers
81
views
Failed to run `npm run build` with wasm file in next.js project
I use my wasm package in a next.js app. The wasm package is written in Rust and compiled by wasm-pack. Everything works very well when I start the app by npm run dev. However, when running npm run ...
2
votes
1
answer
77
views
Webpack build suddenly failing because of `react-dev-utils` [closed]
I am suddenly unable to build my Webpack frontend, I randomly began getting this error despite not making any changes to the code:
Starting the development server...
/home/username/Documents/frontend/...
0
votes
0
answers
69
views
Shared module is not available for eager consumption: webpack/sharing/consume/default/react/react
I am trying to run a React microfrontend application using Webpack Module Federation. The container app (container-app) loads remote apps (mfe-dashboard, mfe-portfolio) dynamically using promise new ...
1
vote
1
answer
409
views
How to migrate from Webpack to @nx/esbuild and replace generate-package-json-webpack-plugin?
I'm migrating an Nx workspace project with Angular 19 from using Webpack (@nx/webpack:webpack) to Esbuild (@nx/esbuild:esbuild).
In my previous setup, I used generate-package-json-webpack-plugin in a ...
0
votes
0
answers
131
views
Webpack Error: I got an error when I ran npm run build
Module build failed: UnhandledSchemeError: Reading from "node:events" is not handled by plugins (Unhandled scheme).
Webpack supports "data:" and "file:" URIs by default.
...
0
votes
3
answers
127
views
Minifiying javascript file with webpack breaks vue functionality (specifically with method calls on class instance)
I am working on an ASP.NET project that uses Vue.js and jQuery. I have a JavaScript file (fields.js) that defines several classes (e.g., Users, Fields) and initializes a Vue instance. When I use the ...
1
vote
0
answers
58
views
Webpack changes URLs in CSS during build: how to keep original relative paths in url()
I have a CSS file with a @font-face declaration where font paths are specified as url("./icons/tficons.woff2"). However, when building with Webpack, these paths get rewritten to url(../tflex-...
1
vote
0
answers
86
views
Tailwind v4 variables are not working in prod build but working in dev
//postcss.config.js
module.exports = {
plugins: {
'@tailwindcss/postcss': {},
},
}
//webpack.mix.js
mix.js('resources/js/app.js', 'public/js')
.react()
.postCss('resources/css/app.css', '...
1
vote
0
answers
89
views
Practices of making a tree-shakeable library, having debug and release WASM builds
Background: I'm creating a JS library that has part of its functionality written in C++ source code, and thus compiles the C++ into WASM. The WASM is then imported by the library code and wrapped into ...
0
votes
0
answers
20
views
npm build error : UnhandledSchemeError: Reading from "C:Userschinnap1mdc-testappsmfesrcindex.tsx" is not handled by plugins (Unhandled scheme)
ERROR in C:Userschinnap1mdc-scorecardappsmfesrcindex.tsx
Module build failed: UnhandledSchemeError: Reading from "C:Userschinnap1mdc-testappsmfesrcindex.tsx" is not handled by plugins (...
0
votes
0
answers
47
views
webpack file doesn't refer node_modules present in the imported path , but refer for it its node_modules
I am webpacking a module from pathA, node_modules are ignored.
I import the pathA/index.js in pathB node index.js dynamically, which has the required node_modules.
But when I run pathB node index.js, ...
0
votes
0
answers
47
views
VS Code debugger shows incorrect step-over order for TypeScript, but actual execution is correct
I'm experiencing a very strange debugging issue in VS Code while developing an extension, and I've exhausted all my debugging knowledge.
The Problem
When step-over debugging my TypeScript code, the ...
0
votes
0
answers
109
views
Next.js internal chunks throwing CSP Violation error
I'm getting CSP errors in my console for Next.js chunks:
52774a7f-5ebbf62ba1149ac0.js:1 Refused to apply inline style because it violates the following Content Security Policy directive: "style-...
1
vote
0
answers
46
views
Storybook with react+webpack error on Windows 11: "EBUSY: resource busy or locked on file storybook-bd11bbccab6ad128d7c2baa2cbb7e575" [duplicate]
We have a React component library that uses Storybook with Webpack. The setup works perfectly on Windows 10, but when running on a Windows 11 machine, Storybook server fails to start with the ...