You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I agree to follow the code of conduct that this project uses.
I have searched the issue tracker for a bug that matches the one I want to file, without success.
Electron Forge version
7.5.0
Electron version
32.2.0
Operating system
Windows 11
Last known working Electron Forge version
Expected behavior
Require module works as usual.
Actual behavior
Require module throws error "Module not found" at built application.
Steps to reproduce
I am trying to require module from node_modules using standart node module api: const neededModule = require("agora-electron-sdk"). Locally everything works correctly, but after building application using electron-forge make i've got these error:
Such behavior appears both at main.js and preload.js. Here is fragment of my BrowserWindow config which probably shall allow using node modules in renderer context:
Thanks for reporting this issue. Would it be possible for you to make a standalone testcase with only the code necessary to reproduce the issue? I'm adding the blocked/need-repro label for this reason. After you make a test case, please link to it in a followup comment.
Pre-flight checklist
Electron Forge version
7.5.0
Electron version
32.2.0
Operating system
Windows 11
Last known working Electron Forge version
Expected behavior
Require module works as usual.
Actual behavior
Require module throws error "Module not found" at built application.
Steps to reproduce
I am trying to require module from node_modules using standart node module api:
const neededModule = require("agora-electron-sdk")
. Locally everything works correctly, but after building application usingelectron-forge make
i've got these error:Such behavior appears both at
main.js
andpreload.js
. Here is fragment of myBrowserWindow
config which probably shall allow using node modules in renderer context:How to make require module work at already built application if there is special need to add non-esm module at project?
Additional information
No response
The text was updated successfully, but these errors were encountered: