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.3.0
Electron version
27.3.5
Operating system
macOS 14.3.1 (23D60)
Last known working Electron Forge version
7.2.0
Expected behavior
A universal (arm64 and x86) native node module should not cause the error:
An unhandled rejection has occurred inside Forge:
Error: Could not find originating native module for "main/native_modules/build/Release/nsUbiquitousKeyValueStore.node"
at Task.task (/Users/matt/Projects/turnip-timer/node_modules/@electron-forge/plugin-webpack/src/WebpackPlugin.ts:211:33)
I suspect this is related to the "magic native module mapping" done in #3437.
Actual behavior
The webpack build should not error when a native node module that is a universal binary is used.
Steps to reproduce
I don't have good steps to reproduce because it's a private repo, but using node-mac-icloud-keyvalue as a node dependency (which is publicly available) is what triggers the issue, since it's built as a universal binary.
Using electron forge 7.2.0 does not exhibit the issue.
Additional information
Relevant parts of my forge.config.ts look like this:
constconfig: ForgeConfig={makers: [newMakerPKG({})],packagerConfig: {// App metadata trimmed for readability, but this part is probably relevant:osxUniversal: {x64ArchFiles: 'Contents/Resources/app/.webpack/**/*.node',},},plugins: [newWebpackPlugin({devContentSecurityPolicy: `default-src * self blob: data: gap:; style-src * self 'unsafe-inline' blob: data: gap:; script-src * 'self' 'unsafe-eval' 'unsafe-inline' blob: data: gap:; object-src * 'self' blob: data: gap:; img-src * self 'unsafe-inline' blob: data: gap:; connect-src self * 'unsafe-inline' blob: data: gap:; frame-src * self blob: data: gap:;`,devServer: {// Disable error overlays; we use our own Error boundaries.client: {overlay: {errors: false,runtimeErrors: false,warnings: false,},},// Disable dev server live reload so React Refresh works.liveReload: false,},// Config includes recommended use of `@vercel/webpack-asset-relocator-loader` from https://www.electronforge.io/config/plugins/webpack#native-node-modules
mainConfig,renderer: {config: rendererConfig,entryPoints: [{html: './src/renderer/index.html',js: `./src/renderer/entryPoint.ts`,name: 'react_app',nodeIntegration: true,preload: {config: preloadConfig,js: './src/preload/index.ts',},},],nodeIntegration: true,},}),],rebuildConfig: {},};exportdefaultconfig;
The text was updated successfully, but these errors were encountered:
Pre-flight checklist
Electron Forge version
7.3.0
Electron version
27.3.5
Operating system
macOS 14.3.1 (23D60)
Last known working Electron Forge version
7.2.0
Expected behavior
A universal (
arm64
andx86
) native node module should not cause the error:I suspect this is related to the "magic native module mapping" done in #3437.
Actual behavior
The webpack build should not error when a native node module that is a universal binary is used.
Steps to reproduce
I don't have good steps to reproduce because it's a private repo, but using
node-mac-icloud-keyvalue
as a node dependency (which is publicly available) is what triggers the issue, since it's built as a universal binary.Using electron forge
7.2.0
does not exhibit the issue.Additional information
Relevant parts of my
forge.config.ts
look like this:The text was updated successfully, but these errors were encountered: