Skip to main content

All Questions

Tagged with
0 votes
0 answers
9 views

Trying to use dotenv or config in react app and getting: webpack < 5 used to include polyfills error, tried creating webpack config, doesn't work

i'm getting this error below trying to use both dotenv and config. I've got a Typescript React App, just installed and need to use environment variables. I don't have webpack installed as a dependency ...
Kevin A.'s user avatar
  • 137
0 votes
0 answers
17 views

Webpack dynamic import in node.js app doesn't work: MODULE_NOT_FOUND

I am trying to import a js file at runtime: const migrationsDir = path.resolve(__dirname, '../migrations/tenanted'); import(path.join(migrationsDir, '1681831306977-initial-schema.js')) .then(() =>...
Vololodymyr's user avatar
  • 2,178
0 votes
0 answers
14 views

Can't run TypeOrm migrations with webpack: MODULE_NOT_FOUND

I have node.js app built with webpack. I am following this FAQ My webpack config has one entrypoint for the migrator script, and multiple entrypoints for migration files: const commonConfig = require('...
Vololodymyr's user avatar
  • 2,178
1 vote
1 answer
46 views
+50

Problem when requiring packages bundled with webpack

I'm able to use libraries with node like: const API = require("api"); const Service = require("service"); however, when I bundle the js file with webpack, it doesn't work and I ...
user17952421's user avatar
0 votes
0 answers
12 views

Can't resolve './zstd.win32-x64-msvc.node' in ...node_modules/@mongodb-js/zstd

I have a react node js typescript project I'm working on via my m2 chip mac where I'm trying to get MongoDB and mongoose setup on. I've installed the basic mongodb package via npm and am getting the ...
Niko Icardo's user avatar
0 votes
0 answers
30 views

Vue3 Openlayers + webpack = can't resolve modules

webpack fails to resolve modules dependencies when compiling I got 94 erros like this: ERROR in ./node_modules/vue3-openlayers/dist/vue3-openlayers.es.js 63:0-41 Module not found: Error: Can't resolve ...
Sam's user avatar
  • 1,723
-2 votes
0 answers
59 views

Error while running react - electron in browser - Uncaught ReferenceError: require is not defined

I am tryin to make a electron - react application and while running i am getting a error on the console of the browser. Uncaught ReferenceError: require is not defined at Object.events (bundle.js:...
Sherlock-Holmes-2-2-1's user avatar
0 votes
0 answers
13 views

how to import a plugin to a Typescript electron app with plugin system manager?

i'm in the process of making an electron app that will support a plugin system that will not cause any changes in the app it will only load components which are the plugins i want to load. and im ...
ryusuke's user avatar
1 vote
1 answer
596 views

PDFjs-dist - TypeError: Promise.withResolvers is not a function - Webpack Node JS

I've got the following "service" which is trying to extract the text from a PDF file but when it runs I am getting the same error every time no matter whether I point it at the main build (...
Ryan Durrant's user avatar
1 vote
0 answers
43 views

How can Babel transpile a Node.js module polyfill (e.g. buffer) to ES5?

I would like to transpile JS code which uses the Node 'buffer' to pure ES5 so it can run on Duktape (with Webpack and Babel). The code has been simplified in a test.js, which uses buffer and console: ...
Jean-Luc's user avatar
0 votes
0 answers
23 views

React App remoteEntry.js is having html instead of JavaScript code

React App remoteEntry.js is having html instead of JavaScript code actual file from tgz file has js code but in browser inspect it shows html, any help is appreciated. Thanks.
Guru prasath's user avatar
4 votes
2 answers
389 views

Angular 18 and SignalR error when building app : [ERROR] Could not resolve "url", "https", "http", "util" from eventsource

In an Angular 18 application, I need to add real-time technology. The chosen technology is SignalR, but I'm having trouble adding the package and getting a successful build. It seems the error is ...
hsantos's user avatar
  • 573
0 votes
0 answers
9 views

Webpack not watching SCSS glob imported files

I am using webpack to compile my scss files which works fine when initially running npx webpack or npx webpack --watch. When using npx webpack --watch, only my declared SCSS file (app.scss) in my ...
kymchee's user avatar
  • 19
0 votes
0 answers
21 views

ElectronForge + Webpack + native addon not working

I've built a native nodejs addon using cpp and compiled it using node-gyp. If I copy the *.node file into my ElectronJS app and run it from my PC it works perfectly, the issue begins when I package ...
Juan Pablo Gómez Uribe's user avatar
0 votes
0 answers
33 views

How to prevent tsup from adding a hash to imports?

I'm using tsup to bundle a TypeScript package. But it's adding a different hash to imports every time I bundle the lib. This isn't good for version control, since every time I try to make a PR it's ...
Carlos Dubón's user avatar

15 30 50 per page
1
2 3 4 5
379