-
Notifications
You must be signed in to change notification settings - Fork 50
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot find module '@electron/remote' using interceptFileProtocol #98
Comments
same here |
may be the same issue #66
And main is not export from package "@electron/remote", you can try the way from issue #66 (comment) mentioned. |
same here. Sadly the suggestion didn't work with electron-forge. |
I used |
in package.json move @electron/remote to dependencies, not devDependencies |
Hello,
i have a strange behavior using @electron/remote with interceptFileProtocol:
main.js
index.htm (render side)
package.json
If i run the application locally "npm start" all work fine. If i run a packaging script "npm run pack" and move the content of the folder "dist" to another location (the dist folder should be self-consistent) i have the following error from @electron/remote module on render side (open debug tool with ctrl+shift+i):
Uncaught Error: Cannot find module '@electron/remote'
Require stack:
at Module._resolveFilename (internal/modules/cjs/loader.js:892)
at Function.o._resolveFilename (electron/js2c/renderer_init.js:29)
at Module._load (internal/modules/cjs/loader.js:737)
at Function.f._load (electron/js2c/asar_bundle.js:5)
at Function.o._load (electron/js2c/renderer_init.js:29)
at Module.require (internal/modules/cjs/loader.js:964)
at require (internal/modules/cjs/helpers.js:88)
at notexist.htm:5
The strange thing is that if i use BrowserWindow.loadFile instead of BrowserWindow.loadURL all work file also on dist folder.
What am I doing wrong on this steps ?
Thanks for support.
The text was updated successfully, but these errors were encountered: