Comments (11)
Okay it builds fine here is the build:
https://www.dropbox.com/s/ktmqhgom624xw4i/productName%200.0.1.exe?dl=0
from vue-electron-template.
@mubaidr working perfectly thank you!
from vue-electron-template.
Can you please try adding this to win
section of your package.json
and then build?
"target": [
{
"target": "portable",
"arch": ["x64", "ia32"]
}
]
I have tested these settings and was able to build and run portable application.
from vue-electron-template.
Hi, thanks for trying this is my package.json I've set the arch but still the same result.
{
"author": "Muhammad Ubaid Raza <[email protected]>",
"bugs": {
"url": "https://github.com/mubaidr/vue-electron-template/issues"
},
"build": {
"appId": "org.mubaidr.vue-electron-template",
"directories": {
"output": "build"
},
"dmg": {
"contents": [
{
"path": "/Applications",
"type": "link",
"x": 410,
"y": 150
},
{
"type": "file",
"x": 130,
"y": 150
}
]
},
"files": [
"dist/electron/**/*"
],
"linux": {
"icon": "build/icons"
},
"mac": {
"icon": "build/icons/icon.icns"
},
"productName": "productName",
"win": {
"target": [
{
"target": "portable",
"arch": ["x64", "ia32"]
}
],
"icon": "build/icon.ico"
}
},
"dependencies": {
"bulma": "^0.7.1",
"vue": "^2.5.16",
"vue-electron": "^1.0.6",
"vue-router": "^3.0.1",
"vuex": "^3.0.1"
},
"description": "An electron-vue project",
"devDependencies": {
"babel-core": "^6.26.3",
"babel-eslint": "^8.2.3",
"babel-loader": "^7.1.4",
"babel-plugin-istanbul": "^4.1.6",
"babel-plugin-transform-runtime": "^6.23.0",
"babel-preset-env": "^1.7.0",
"babel-preset-stage-0": "^6.24.1",
"babel-register": "^6.26.0",
"copy-webpack-plugin": "^4.5.1",
"cross-env": "^5.1.5",
"css-loader": "^0.28.11",
"del": "^3.0.0",
"devtron": "^1.4.0",
"electron": "^2.0.1",
"electron-builder": "^20.13.4",
"electron-debug": "^1.5.0",
"electron-rebuild": "^1.7.3",
"eslint": "^4.19.1",
"eslint-config-airbnb-base": "^12.1.0",
"eslint-import-resolver-webpack": "^0.10.0",
"eslint-loader": "^2.0.0",
"eslint-plugin-import": "^2.12.0",
"eslint-plugin-vue": "^4.5.0",
"file-loader": "^1.1.11",
"html-webpack-plugin": "^3.2.0",
"inject-loader": "^4.0.1",
"less": "^3.0.4",
"less-loader": "^4.1.0",
"mini-css-extract-plugin": "0.4.0",
"multispinner": "^0.2.1",
"node-loader": "^0.6.0",
"node-sass": "^4.9.0",
"sass-loader": "^7.0.1",
"style-loader": "^0.21.0",
"url-loader": "^1.0.1",
"vue-devtools": "^3.1.9",
"vue-html-loader": "^1.2.4",
"vue-loader": "^15.0.11",
"vue-style-loader": "^4.1.0",
"vue-template-compiler": "^2.5.16",
"webpack": "^4.8.3",
"webpack-cli": "^2.1.3",
"webpack-dev-server": "3.1.4",
"webpack-hot-middleware": "^2.22.2"
},
"license": "MIT",
"main": "./dist/electron/main.js",
"name": "vue-electron-template",
"repository": {
"type": "git",
"url": "git+https://github.com/mubaidr/vue-electron-template.git"
},
"scripts": {
"build": "npm run pack && electron-builder",
"build:dir": "npm run pack && electron-builder --dir",
"build:linux": "npm run pack && electron-builder --linux",
"build:mac": "npm run pack && electron-builder --mac",
"build:win": "npm run pack && electron-builder --win",
"build:win-app": "npm run pack && electron-builder",
"clean": "cross-env BUILD_TARGET=clean node vue-electron/build.js",
"dev": "cross-env NODE_ENV=development node vue-electron/dev-runner.js",
"lint": "eslint --ext .js,.vue src test",
"lint:fix": "eslint --ext .js,.vue --fix src test",
"pack": "cross-env NODE_ENV=production npm run pack:main && npm run pack:renderer",
"pack:main": "webpack --mode production --progress --config vue-electron/webpack.main.config.js",
"pack:renderer": "webpack --mode production --progress --config vue-electron/webpack.renderer.config.js",
"postinstall": "electron-builder install-app-deps && npm rebuild node-sass",
"rebuild-electron": "./node_modules/.bin/electron-rebuild"
},
"version": "0.0.1"
}
from vue-electron-template.
from vue-electron-template.
Yeah the unpacked directory exe runs fine. I'm just using the npm run build script.
Target platform is Windows only.
Build environment is Razer Blade Pro Windows x64:
Node: 8.11.1
Electron: 2.0.0
NPM: 6.1.0
Building in Visual Studio Code
Sorry not sure what else you need?
from vue-electron-template.
If the unpacked version is working that means template is working fine, something during the build got broken.
I have almost similar environment (but node is > 10) and it works fine, I will try to replicate this issue with exact same environment.
Please;
- Try building a normal installer for Windows
- Is there any error when you build (both portable & installer)?
from vue-electron-template.
The installer works fine same as the unpacked version... I've installed node 10 but still no joy! Would be alot easier if I could get some sort of error log out of the portable exe.
No errors when building installer or installer and portable.
from vue-electron-template.
-
First of all pull the latest changes, which have updated dependencies.
-
Open cmd in your cloned project root and run:
node custom-build.js
and then if it successfully builds uploaded/share the production build.
from vue-electron-template.
Thanks I have been able to identify this issue. This happens when build script is run with NODE_ENV=development
.
Correct way is to set NODE_ENV=production
and then run the build.
I am working on improving the scripts to avoid this issue.
from vue-electron-template.
Should be fixed in: b42fc8c
from vue-electron-template.
Related Issues (20)
- Update dependent packages? HOT 3
- lang=scss in vue single file component cause Module build failed HOT 2
- Vue 3 support?? HOT 1
- npm run pack:web failes with Module not found HOT 3
- Status of this project? HOT 3
- Add `--debug` flag support for production build
- Add build for web HOT 8
- Customizing app Icon from default HOT 2
- Question about workers HOT 1
- Include Express.js HOT 3
- Works well in dev mode, build successfully but can't launch after building. HOT 5
- console.log() not printing HOT 6
- trojan in node_modules... HOT 1
- Disable or customize Context menu HOT 10
- Modify src/main causes multiple electron on reload HOT 9
- An unhandled error occurred inside electron-build HOT 2
- Using Typescript in vue components HOT 3
- Error when npm install HOT 2
- main process hot reload cause duplicated windows HOT 2
- Vue 3 support? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vue-electron-template.