Closed Kaa10 closed 5 years ago
can you paste your package.json
file? especially the dependency and dev-dependency sections?
can you paste your
package.json
file? especially the dependency and dev-dependency sections?
Yes, of course.
{ "name": "app", "version": "0.0.0", "author": "Kaayo", "description": "Protótipo", "license": "", "main": "./dist/electron/main.js", "scripts": { "build": "node .electron-vue/build.js && electron-builder", "build:dir": "node .electron-vue/build.js && electron-builder --dir", "build:clean": "cross-env BUILD_TARGET=clean node .electron-vue/build.js", "build:web": "cross-env BUILD_TARGET=web node .electron-vue/build.js", "dev": "node .electron-vue/dev-runner.js", "watch": "cross-env BUILD_TARGET=web node .electron-vue/dev-runner.js", "pack": "npm run pack:main && npm run pack:renderer", "pack:main": "cross-env NODE_ENV=production webpack --progress --colors --config .electron-vue/webpack.main.config.js", "pack:renderer": "cross-env NODE_ENV=production webpack --progress --colors --config .electron-vue/webpack.renderer.config.js", "postinstall": "" }, "build": { "productName": "App", "appId": "org.simulatedgreg.electron-vue", "directories": { "output": "build" }, "files": [ "dist/electron/*/" ], "dmg": { "contents": [ { "x": 410, "y": 150, "type": "link", "path": "/Applications" }, { "x": 130, "y": 150, "type": "file" } ] }, "mac": { "icon": "build/icons/icon.icns" }, "win": { "icon": "build/icons/icon.ico" }, "linux": { "icon": "build/icons" } }, "dependencies": { "electron-remote": "^1.3.0", "moment": "^2.24.0", "pg": "^7.4.3", "ws": "^6.1.0" }, "devDependencies": { "@mdi/font": "^2.4.85", "@types/moment": "^2.13.0", "acrobat": "^0.1.0", "ajv": "^6.10.0", "ajv-keywords": "^3.4.0", "babel-core": "^6.25.0", "babel-loader": "^7.1.1", "babel-plugin-transform-runtime": "^6.23.0", "babel-preset-env": "^1.6.0", "babel-preset-stage-0": "^6.24.1", "babel-register": "^6.24.1", "babili-webpack-plugin": "^0.1.2", "cfonts": "^1.1.3", "chalk": "^2.1.0", "copy-webpack-plugin": "^4.0.1", "cross-env": "^5.0.5", "css-loader": "^0.28.4", "del": "^3.0.0", "devtron": "^1.4.0", "electron": "^5.0.0", "electron-builder": "^20.40.2", "electron-debug": "^1.5.0", "electron-devtools-installer": "^2.2.0", "extract-text-webpack-plugin": "^3.0.0", "file-loader": "^0.11.2", "html-webpack-plugin": "^2.30.1", "jest-worker": "^24.6.0", "material-design-icons-iconfont": "^3.0.3", "multispinner": "^0.2.1", "node-loader": "^0.6.0", "node-worker-farm": "^1.3.1", "pdfmake": "^0.1.53", "style-loader": "^0.18.2", "stylus": "^0.54.5", "stylus-loader": "^3.0.1", "url-loader": "^1.0.1", "vue": "^2.6.8", "vue-html-loader": "^1.2.4", "vue-loader": "^13.0.5", "vue-router": "^3.0.1", "vue-style-loader": "^3.0.1", "vue-template-compiler": "^2.6.8", "vuetify": "^1.5.5", "vuex": "^3.1.0", "webpack": "^3.12.0", "webpack-dev-server": "^2.7.1", "webpack-hot-middleware": "^2.18.2", "worker-loader": "^2.0.0", "worker-plugin": "^3.1.0", "workerpool": "^3.1.2" } }
may I ask how did you create your app? cause I just created a new fresh app, and the webpack version was "webpack": "^4.15.1"
not "webpack": "^3.12.0"
.
this is an example of the package.json
file for the newly created project I mentioned:
{
"name": "testing",
"version": "0.0.1",
"author": "Zaher Ghaibeh <z@zah.me>",
"description": "An electron-vue project",
"license": null,
"main": "./dist/electron/main.js",
"scripts": {
"build": "node .electron-vue/build.js && electron-builder",
"build:dir": "node .electron-vue/build.js && electron-builder --dir",
"build:clean": "cross-env BUILD_TARGET=clean node .electron-vue/build.js",
"build:web": "cross-env BUILD_TARGET=web node .electron-vue/build.js",
"dev": "node .electron-vue/dev-runner.js",
"e2e": "npm run pack && mocha test/e2e",
"lint": "eslint --ext .js,.vue -f ./node_modules/eslint-friendly-formatter src test",
"lint:fix": "eslint --ext .js,.vue -f ./node_modules/eslint-friendly-formatter --fix src test",
"pack": "npm run pack:main && npm run pack:renderer",
"pack:main": "cross-env NODE_ENV=production webpack --progress --colors --config .electron-vue/webpack.main.config.js",
"pack:renderer": "cross-env NODE_ENV=production webpack --progress --colors --config .electron-vue/webpack.renderer.config.js",
"test": "npm run unit && npm run e2e",
"unit": "karma start test/unit/karma.conf.js",
"postinstall": "npm run lint:fix"
},
"build": {
"productName": "testing",
"appId": "com.example.yourapp",
"directories": {
"output": "build"
},
"files": [
"dist/electron/**/*"
],
"dmg": {
"contents": [
{
"x": 410,
"y": 150,
"type": "link",
"path": "/Applications"
},
{
"x": 130,
"y": 150,
"type": "file"
}
]
},
"mac": {
"icon": "build/icons/icon.icns"
},
"win": {
"icon": "build/icons/icon.ico"
},
"linux": {
"icon": "build/icons"
}
},
"dependencies": {
"vue": "^2.5.16",
"axios": "^0.18.0",
"vue-electron": "^1.0.6",
"vue-router": "^3.0.1",
"vuex": "^3.0.1",
"vuex-electron": "^1.0.0"
},
"devDependencies": {
"ajv": "^6.5.0",
"babel-core": "^6.26.3",
"babel-loader": "^7.1.4",
"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",
"babili-webpack-plugin": "^0.1.2",
"cfonts": "^2.1.2",
"chalk": "^2.4.1",
"copy-webpack-plugin": "^4.5.1",
"cross-env": "^5.1.6",
"css-loader": "^0.28.11",
"del": "^3.0.0",
"devtron": "^1.4.0",
"electron": "^2.0.4",
"electron-debug": "^1.5.0",
"electron-devtools-installer": "^2.2.4",
"electron-builder": "^20.19.2",
"babel-eslint": "^8.2.3",
"eslint": "^4.19.1",
"eslint-friendly-formatter": "^4.0.1",
"eslint-loader": "^2.0.0",
"eslint-plugin-html": "^4.0.3",
"eslint-config-standard": "^11.0.0",
"eslint-plugin-import": "^2.12.0",
"eslint-plugin-node": "^6.0.1",
"eslint-plugin-promise": "^3.8.0",
"eslint-plugin-standard": "^3.1.0",
"mini-css-extract-plugin": "0.4.0",
"file-loader": "^1.1.11",
"html-webpack-plugin": "^3.2.0",
"inject-loader": "^4.0.1",
"karma": "^2.0.2",
"karma-chai": "^0.1.0",
"karma-coverage": "^1.1.2",
"karma-electron": "^6.0.0",
"karma-mocha": "^1.3.0",
"karma-sourcemap-loader": "^0.3.7",
"karma-spec-reporter": "^0.0.32",
"karma-webpack": "^3.0.0",
"require-dir": "^1.0.0",
"spectron": "^3.8.0",
"babel-plugin-istanbul": "^4.1.6",
"chai": "^4.1.2",
"mocha": "^5.2.0",
"multispinner": "^0.2.1",
"node-loader": "^0.6.0",
"node-sass": "^4.9.2",
"sass-loader": "^7.0.3",
"style-loader": "^0.21.0",
"url-loader": "^1.0.1",
"vue-html-loader": "^1.2.4",
"vue-loader": "^15.2.4",
"vue-style-loader": "^4.1.0",
"vue-template-compiler": "^2.5.16",
"webpack-cli": "^3.0.8",
"webpack": "^4.15.1",
"webpack-dev-server": "^3.1.4",
"webpack-hot-middleware": "^2.22.2",
"webpack-merge": "^4.1.3"
}
}
What happens is that I downloaded this boilerplate a while ago, and at the time I was already with this version of the webpack. So I'll do as you mentioned, I'll get an app from the beginning with the updated boilerplate. As soon as I do some tests here, I'll let you know. So far thank you!
I checked my boilerplate again and made a mistake, I'm using the boilerplate rolandalla / Electron-VueJs-Vuetify. I've already opened a question for the repository author. Sorry for the mistake and thank you for the attention!
Link: https://github.com/rolandalla/Electron-VueJs-Vuetify/issues/1
You are most welcome @Kaa10, I think you can close this issue.
installed webpack 4
Error;