-
-
Notifications
You must be signed in to change notification settings - Fork 282
Application entry file "electron/bundled/background.js" in the "....app.asar" does not exist #188
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
Comments
Change the |
Hey, that helped with the build but the |
Both |
I couldn't get it working with re-installing deps. Even tried cleaning cache. Then I got it working by deleting the previously built electron destination folder. Thanks for the help. |
Actually valid value for that field is "./src/background.js", thats why for example "electron ." command doesnt work ("Unable to find Electron app") The other part of the problem is that LTS version of Node doesnt work with ES6 without transpiling, but I beleive it will in couple of months, after that we will be able to quickly run app (~1s instead of ~20s with electron:serve), but the command will be long and a bit ugly "electron src/backgound.js" because of BTW, the names of main files are confusing because most Electron examples using main.js (its background.js here) and renderer.js (its main.js here) |
Vue CLI uses main.js by default, and I'd rather not change it. I think it would be more confusing if I mess with a user's app. It should only take a few seconds to build the main process. |
Since VueCLI does it, thats fine, thank you. |
I thought i was not supposed to change this field. Noticed that changing this to |
It should be |
I got the same problem:
and my package.json:
EDIT: Sorry, I had a missconfiguration from the migrated repo in the build configs.
|
Still experiencing this problem!
package.json:
Still no idea how to solve this problem. yarn build as well as npm build do not work. |
@DatMoser remove the |
Thanks! :D |
My project has the same issue. It happens when I upgrade to electron 7.1.3. https://github.com/gengjiawen/electron-devdocs is the repo. Any suggestion ? thanks. |
@gengjiawen your project appears to use electron v8 and works fine for me, were you able to resolve your issue? |
yes, I fix it.turns out electron builder json looks not supported. I put the config in vue.config.js, and the error goes away. |
Error fixed after changing the
to
|
Intended to fix error during build. Resolves https://github.com/MediaWikiAGE/MAGE/issues/6 See also: nklayman/vue-cli-plugin-electron-builder#188
Hey guys, I'm using TypeScript and it builds the background.ts file out to the "dist_electron/bundled/background.js" location, and I have tried the following paths, but it's still not working:
I deleted my dist_electron folder each time that I changed the path and ran: Node modules: "dependencies": {
"@fortawesome/fontawesome-free": "^5.15.1",
"apexcharts": "^3.23.1",
"color-convert": "^2.0.1",
"color-scheme": "^1.0.1",
"core-js": "^3.6.5",
"electron-updater": "^4.3.5",
"inversify-props": "^1.0.5",
"moment": "^2.29.1",
"nedb": "^1.8.0",
"node-notifier": "^9.0.0",
"node-notifier-in-electron-vue": "^5.4.2",
"normalize.css": "^8.0.1",
"open": "^7.3.1",
"path": "^0.12.7",
"reflect-metadata": "^0.1.13",
"rxjs": "^6.6.3",
"uniqid": "^5.2.0",
"update-electron-app": "^2.0.1",
"vue": "^2.6.11",
"vue-apexcharts": "^1.6.0",
"vue-class-component": "^7.2.3",
"vue-clickaway": "^2.2.2",
"vue-funnel-graph-js": "^0.1.8",
"vue-property-decorator": "^9.1.2",
"vue-router": "^3.2.0",
"vuex": "^3.4.0",
"vuex-class": "^0.3.2"
},
"devDependencies": {
"@types/color-convert": "^2.0.0",
"@types/electron-devtools-installer": "^2.2.0",
"@types/jest": "^24.0.19",
"@types/nedb": "^1.8.11",
"@types/node-notifier": "^8.0.0",
"@types/uniqid": "^5.2.0",
"@types/vue-clickaway": "^2.2.0",
"@typescript-eslint/eslint-plugin": "^2.33.0",
"@typescript-eslint/parser": "^2.33.0",
"@vue/cli-plugin-babel": "~4.5.0",
"@vue/cli-plugin-e2e-cypress": "~4.5.0",
"@vue/cli-plugin-eslint": "~4.5.0",
"@vue/cli-plugin-router": "~4.5.0",
"@vue/cli-plugin-typescript": "^4.5.11",
"@vue/cli-plugin-unit-jest": "~4.5.0",
"@vue/cli-plugin-vuex": "~4.5.0",
"@vue/cli-service": "~4.5.0",
"@vue/eslint-config-typescript": "^5.0.2",
"@vue/test-utils": "^1.0.3",
"electron": "^9.0.0",
"electron-devtools-installer": "^3.1.0",
"electron-webpack": "^2.8.2",
"eslint": "^6.7.2",
"eslint-plugin-vue": "^6.2.2",
"node-sass": "^4.12.0",
"sass-loader": "^8.0.1",
"typescript": "~3.9.3",
"vue-cli-plugin-electron-builder": "~2.0.0-rc.5",
"vue-swatches": "^2.1.0",
"vue-template-compiler": "^2.6.11",
"vuex-module-decorators": "^1.0.1"
} Error: |
@chriso86 If you open a new issue that follows the bug report template I should be able to help you fix your problem. |
The file The ultimate way for me to solve this issue is to install a package called In my case, I used webpack to pack the files, and the packed main file located in If all the solutions above did not solve your issues, please try this way. Hope this could help! |
I have the same issue:
If I unzip the package.json:
vue.config.js:
Tried to remove the Please guys I have the same issue several times after upgrades. Could you guys please fix it ones and forever? P.S. I think the issue must be reopened. |
@fairking try removing both your |
Thanks @nklayman I did as you said. Still the same error:
The package.json:
The vue.config.js:
The unzipped The unzipped Looks like the error says it is looking in Should it be |
Yeah I'm not sure how you ended up with a |
I don't know. There is a very basic project generated from cli, nothing special. I think it is a |
Ahh, it's because you are running |
But those calls tell which platform needs to be build? How do I build linux version by using |
All args you pass to |
Thanks a lot @nklayman . It solved all problems. |
You may be getting all the errors mentioned in this issue when building your Vue based Electron app using GitHub Actions using the famous https://github.com/samuelmeuli/action-electron-builder GitHub Actions plugin. Thus your googling may lead you here. The errors are:
As samuelmeuli/action-electron-builder#66 says, you simply need to add - name: Build/release Electron app
uses: samuelmeuli/action-electron-builder@v1
with:
github_token: ${{ secrets.github_token }}
use_vue_cli: true # <-------- you need this
release: ${{ startsWith(github.ref, 'refs/tags/v') }} DetailIn a Github Actions workflow
instead of the problematic, plain electron-builder invocation, which builds in the
Look in your Github Action build logs to see which command is being invoked. We want Vue with Electron via the Vue plugin vue-cli-plugin-electron-builder, not just plain Electron without Vue. The
Remember:
Hope this info helps someone, as it took me a while to figure out. |
Trying to fix build error. Ref. nklayman/vue-cli-plugin-electron-builder#188 (comment)
mac os,use this |
Ok, I am losing my mind on this one. xD My problem, it seems, that the Here is my env: Here is my
and here is the
Here is the file structure that gets generated upon build: Anything else I can provide? I appreciate the help |
For @Flavsditz and anyone else finding this; the background.ts file is compiled to dist_electron/bundles/index.js so just change your "main" from "background.js" to "index.js" in your package.json. |
- Introduce `fresh-npm-install.sh` to automate clean npm environment setup. - Revert workaround 924b326, resolved by updating Font Awesome. - Remove `vue-template-compiler` and `@vue/test-utils` from dependencies, they're obsolete in 2.7. - Update anchor references to start with lower case in line with MD051/link-fragments, introduced by updated `markdownlint`. - Upgrade cypress to > 10, which includes: - Change spec extensions from `*.spec.js` to `*.cy.js`. - Change configuration file from `cypress.json` to `cypress.config.ts`. - Remove most configurations from `cypress/plugins/index.js`. These configurations were initially generated by Vue CLI but obsoleted in newer cypress versions. - Lock Typescript version to 4.6.x due to lack of support in unmaintained Vue CLI TypeScript plugin (see vuejs/vue-cli#7401). - Use `setWindowOpenHandler` on Electron, replacing deprecated `new-event` event. - Document inability to upgrade `typescript-eslint` dependencies because `@vue/eslint-config-typescript` does not support them. See vuejs/eslint-config-typescript#60, vuejs/eslint-config-typescript#59, vuejs/eslint-config-typescript#57. - Fix `typescript` version to 4.6.X and `tslib` version to 2.4.x, unit tests exit with a maximum call stack size exceeded error: ``` ... MOCHA Testing... RUNTIME EXCEPTION Exception occurred while loading your tests [=========================] 100% (completed) RangeError: Maximum call stack size exceeded at RegExp.exec (<anonymous>) at retrieveSourceMapURL (/project/node_modules/source-map-support/source-map-support.js:174:21) at Array.<anonymous> (/project/node_modules/source-map-support/source-map-support.js:186:26) at /project/node_modules/source-map-support/source-map-support.js:85:24 at mapSourcePosition (/project/node_modules/source-map-support/source-map-support.js:216:21) ... ``` Issue has been reported but not fixed, suggested solutions did not work, see evanw/node-source-map-support#252. - Update `vue-cli-plugin-electron-builder` to latest alpha version. This allows upgrading `ts-loader` to latest and using latest `electron-builder`. Change `main` property value in `package.json` to `index.js` for successful electron builds (see nklayman/vue-cli-plugin-electron-builder#188).
- Introduce `fresh-npm-install.sh` to automate clean npm environment setup. - Revert workaround 924b326, resolved by updating Font Awesome. - Remove `vue-template-compiler` and `@vue/test-utils` from dependencies, they're obsolete in 2.7. - Update anchor references to start with lower case in line with MD051/link-fragments, introduced by updated `markdownlint`. - Upgrade cypress to > 10, which includes: - Change spec extensions from `*.spec.js` to `*.cy.js`. - Change configuration file from `cypress.json` to `cypress.config.ts`. - Remove most configurations from `cypress/plugins/index.js`. These configurations were initially generated by Vue CLI but obsoleted in newer cypress versions. - Lock Typescript version to 4.6.x due to lack of support in unmaintained Vue CLI TypeScript plugin (see vuejs/vue-cli#7401). - Use `setWindowOpenHandler` on Electron, replacing deprecated `new-event` event. - Document inability to upgrade `typescript-eslint` dependencies because `@vue/eslint-config-typescript` does not support them. See vuejs/eslint-config-typescript#60, vuejs/eslint-config-typescript#59, vuejs/eslint-config-typescript#57. - Fix `typescript` version to 4.6.X and `tslib` version to 2.4.x, unit tests exit with a maximum call stack size exceeded error: ``` ... MOCHA Testing... RUNTIME EXCEPTION Exception occurred while loading your tests [=========================] 100% (completed) RangeError: Maximum call stack size exceeded at RegExp.exec (<anonymous>) at retrieveSourceMapURL (/project/node_modules/source-map-support/source-map-support.js:174:21) at Array.<anonymous> (/project/node_modules/source-map-support/source-map-support.js:186:26) at /project/node_modules/source-map-support/source-map-support.js:85:24 at mapSourcePosition (/project/node_modules/source-map-support/source-map-support.js:216:21) ... ``` Issue has been reported but not fixed, suggested solutions did not work, see evanw/node-source-map-support#252. - Update `vue-cli-plugin-electron-builder` to latest alpha version. This allows upgrading `ts-loader` to latest and using latest `electron-builder`. Change `main` property value in `package.json` to `index.js` for successful electron builds (see nklayman/vue-cli-plugin-electron-builder#188).
- Introduce `fresh-npm-install.sh` to automate clean npm environment setup. - Revert workaround ff134da, resolved by updating Font Awesome. - Remove `vue-template-compiler` and `@vue/test-utils` from dependencies, they're obsolete in 2.7. - Update anchor references to start with lower case in line with MD051/link-fragments, introduced by updated `markdownlint`. - Upgrade cypress to > 10, which includes: - Change spec extensions from `*.spec.js` to `*.cy.js`. - Change configuration file from `cypress.json` to `cypress.config.ts`. - Remove most configurations from `cypress/plugins/index.js`. These configurations were initially generated by Vue CLI but obsoleted in newer cypress versions. - Lock Typescript version to 4.6.x due to lack of support in unmaintained Vue CLI TypeScript plugin (see vuejs/vue-cli#7401). - Use `setWindowOpenHandler` on Electron, replacing deprecated `new-event` event. - Document inability to upgrade `typescript-eslint` dependencies because `@vue/eslint-config-typescript` does not support them. See vuejs/eslint-config-typescript#60, vuejs/eslint-config-typescript#59, vuejs/eslint-config-typescript#57. - Fix `typescript` version to 4.6.X and `tslib` version to 2.4.x, unit tests exit with a maximum call stack size exceeded error: ``` ... MOCHA Testing... RUNTIME EXCEPTION Exception occurred while loading your tests [=========================] 100% (completed) RangeError: Maximum call stack size exceeded at RegExp.exec (<anonymous>) at retrieveSourceMapURL (/project/node_modules/source-map-support/source-map-support.js:174:21) at Array.<anonymous> (/project/node_modules/source-map-support/source-map-support.js:186:26) at /project/node_modules/source-map-support/source-map-support.js:85:24 at mapSourcePosition (/project/node_modules/source-map-support/source-map-support.js:216:21) ... ``` Issue has been reported but not fixed, suggested solutions did not work, see evanw/node-source-map-support#252. - Update `vue-cli-plugin-electron-builder` to latest alpha version. This allows upgrading `ts-loader` to latest and using latest `electron-builder`. Change `main` property value in `package.json` to `index.js` for successful electron builds (see nklayman/vue-cli-plugin-electron-builder#188).
Describe the bug
Looks like there is some misconfiguration happening with electron-builder
To Reproduce
Run the following:
Expected behavior
Building should work
Screenshots
Environment (please complete the following information):
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: