so i was trying to build electron app, after build is created , i am getting some error,…
- User
so i was trying to build electron app, after build is created , i am getting some error, seems like nextjs build is not linked properly electron build config
require('dotenv').config({ path: process.env.DOTENV_PATH });
const config = { appId: 'com.usebruno.app', productName: 'Bruno', electronVersion: '31.2.1', directories: { buildResources: 'resources', output: 'out' }, files: ['**/*'], afterSign: 'notarize.js', mac: { artifactName: '{name}_{version}{arch}_{os}.{ext}', category: 'public.app-category.developer-tools', target: [ { target: 'dmg', arch: ['x64', 'arm64'] }, { target: 'zip', arch: ['x64', 'arm64'] } ], icon: 'resources/icons/mac/icon.icns', hardenedRuntime: true, identity: 'Anoop MD (W7LPPWA48L)', entitlements: 'resources/entitlements.mac.plist', entitlementsInherit: 'resources/entitlements.mac.plist' }, linux: { artifactName: '{name}{version}_{arch}linux.{ext}', icon: 'resources/icons/png', target: ['AppImage', 'deb', 'snap', 'rpm'] }, win: { artifactName: '{name}{version}_{arch}_win.{process.env.WIN_CERT_FILEPATH}${process.env.WIN_CERT_PASSWORD}` } };
- Assistant
- User
so about this out folder, i would have to include it in asset no?
- Assistant
- User
ok so once i am setting next export as static content of electron, it is removing all js.map files too, what are these files and is that causing issues?
- Assistant
- User
so thing is code is working when in dev mode but not when in production mode,
- Assistant
- User
ok so error was not in electron build but in nextjs build as its export was giving me error
these steps are for development mode, how to make a production build ?
use nodejs 20 version
nvm use
install deps
npm i --legacy-peer-deps
build packages
npm run build:graphql-docs npm run build:bruno-query npm run build:bruno-common
bundle js sandbox libraries
npm run sandbox:bundle-libraries --workspace=packages/bruno-js
run next app (terminal 1)
npm run dev:web
run electron app (terminal 2)
npm run dev:electron
- Assistant
- User
btw this is the structure of this so tell me now how to build it ├── assets │ └── images ├── contributing.md ├── docs │ ├── contributing │ ├── publishing │ └── readme ├── license.md
├── package.json ├── package-lock.json ├── packages │ ├── bruno-app │ ├── bruno-cli │ ├── bruno-common │ ├── bruno-docs │ ├── bruno-electron │ ├── bruno-graphql-docs │ ├── bruno-js │ ├── bruno-lang │ ├── bruno-query │ ├── bruno-schema │ ├── bruno-tests │ └── bruno-toml ├── playwright.config.js ├── publishing.md ├── readme.md ├── scripts │ ├── build-electron.js │ └── build-electron.sh └── tests ├── home.spec.js ├── pages └── utils
- Assistant