All Questions
5,684
questions
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 ...
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(() =>...
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('...
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 ...
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 ...
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 ...
-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:...
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 ...
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 (...
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:
...
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.
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 ...
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 ...
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 ...
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 ...