-
-
Notifications
You must be signed in to change notification settings - Fork 613
Closed
Description
Pre-flight checklist
- I have read the contribution documentation for this project.
- 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
v29.0.1
Operating system
macOS 13.6.1
Last known working Electron Forge version
No response
Expected behavior
No missing required modules after import, and work normally
Actual behavior
Error: Cannot find module '@electron-forge/plugin-fuses', make failed
Steps to reproduce
- manually create project(https://www.electronjs.org/docs/latest/tutorial/tutorial-first-app)
- ...
- check
devDependenciesonly haveelectroninpackage.json - import project(https://www.electronjs.org/docs/latest/tutorial/tutorial-packaging)
- npm install --save-dev @electron-forge/cli
- npx electron-forge import
- npm run make
Additional information
package.json:
{
"name": "first-electron-app",
"version": "1.0.0",
"description": "",
"main": "main.js",
"scripts": {
- "start": "electron .",
+ "start": "electron-forge start",
- "test": "echo \"Error: no test specified\" && exit 1"
+ "test": "echo \"Error: no test specified\" && exit 1",
+ "package": "electron-forge package",
+ "make": "electron-forge make"
},
"keywords": [],
"author": "",
"license": "ISC",
"devDependencies": {
+ "@electron-forge/cli": "^7.3.0",
+ "@electron-forge/maker-deb": "^7.3.0",
+ "@electron-forge/maker-rpm": "^7.3.0",
+ "@electron-forge/maker-squirrel": "^7.3.0",
+ "@electron-forge/maker-zip": "^7.3.0",
+ "@electron-forge/plugin-auto-unpack-natives": "^7.3.0",
"electron": "^29.0.1"
+ },
+ "dependencies": {
+ "electron-squirrel-startup": "^1.0.0"
}
}forge.config.js:
const { FusesPlugin } = require('@electron-forge/plugin-fuses');
const { FuseV1Options, FuseVersion } = require('@electron/fuses');
module.exports = {
packagerConfig: {
asar: true,
},
rebuildConfig: {},
makers: [
{
name: '@electron-forge/maker-squirrel',
config: {},
},
{
name: '@electron-forge/maker-zip',
platforms: ['darwin'],
},
{
name: '@electron-forge/maker-deb',
config: {},
},
{
name: '@electron-forge/maker-rpm',
config: {},
},
],
plugins: [
{
name: '@electron-forge/plugin-auto-unpack-natives',
config: {},
},
// Fuses are used to enable/disable various Electron functionality
// at package time, before code signing the application
new FusesPlugin({
version: FuseVersion.V1,
[FuseV1Options.RunAsNode]: false,
[FuseV1Options.EnableCookieEncryption]: true,
[FuseV1Options.EnableNodeOptionsEnvironmentVariable]: false,
[FuseV1Options.EnableNodeCliInspectArguments]: false,
[FuseV1Options.EnableEmbeddedAsarIntegrityValidation]: true,
[FuseV1Options.OnlyLoadAppFromAsar]: true,
}),
],
};Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels