所以我用电子生成器构建了一个电子应用程序。因此,在将其安装在服务器计算机上之后,每7台计算机中只有3台在运行。我不知道为什么。。。搜索该错误并不能真正使我更好地理解。
但是对于许多其他PC,我收到“找不到通向isntall的良好路径”错误。这是我的依赖项:
我的package.json看起来像这样:
{
"name": "",
"version": "0.0.1",
"private": true,
"description": "spa app with nfc tags.",
"build": {
"appId": "xx.xxxxxx",
"mac": {
"category": "public.app-category.business"
},
"files": [
"*.js",
"app/renderer/assets/css/app.css",
"build"
],
"nsis" : {
"allowToChangeInstallationDirectory": true,
"oneClick": false,
"perMachine": true,
"runAfterFinish": false,
"createDesktopShortcut": true,
"createStartMenuShortcut" : true
}
},
"keywords": [
"electron",
"nfc",
"nfc-pcsc",
"vue"
],
"nodeGypRebuild": "true",
"homepage": "https://github.com/pokusew/electron-vue-nfc#readme",
"bugs": {
"url": "https://github.com/pokusew/electron-vue-nfc/issues"
},
"license": "MIT",
"author": {
"name": "Martin Endler",
"url": "https://github.com/pokusew"
},
"main": "main.js",
"repository": {
"type": "git",
"url": "https://github.com/pokusew/electron-vue-nfc.git"
},
"scripts": {
"build": "yarn run build-main && yarn run build-renderer && powershell -Command Copy-Item ./app/renderer/assets/css/app.css -Destination ./build && powershell -Command Copy-Item ./icon.ico -Destination ./build",
"build-main": "cross-env NODE_ENV=production node -r @babel/register ./node_modules/webpack/bin/webpack --config webpack.config.main.prod.js --progress --profile --colors",
"build-renderer": "rimraf build && cross-env NODE_ENV=production node -r @babel/register ./node_modules/webpack/bin/webpack --config webpack.config.renderer.prod.js --progress --profile --colors",
"hot-server": "cross-env NODE_ENV=development node -r @babel/register ./node_modules/webpack-dev-server/bin/webpack-dev-server --config ./webpack.config.renderer.dev.js",
"rebuild": "electron-rebuild -f -w nfc-pcsc",
"start": "cross-env NODE_ENV=production electron ./",
"start-hot": "cross-env HOT=1 NODE_ENV=development electron -r @babel/register -r @babel/polyfill ./main.development",
"pack": "electron-builder --dir",
"dist": "electron-builder",
"pack-win": "electron-builder --win --x64",
"post-install": "electron-builder install-app-deps"
},
"dependencies": {
"@babel/polyfill": "^7.0.0-beta.46",
"axios": "^0.18.0",
"electron-log": "^2.2.14",
"moment": "^2.22.1",
"nfc-pcsc": "^0.6.2",
"vue": "^2.0.1",
"vue-config": "^1.0.0",
"vue-momentjs": "^0.1.2",
"vue-router": "^3.0.1",
"vuetify": "^1.0.17",
"windows": "^0.0.8"
},
"devDependencies": {
"@babel/core": "^7.0.0-beta.46",
"@babel/plugin-proposal-class-properties": "^7.0.0-beta.46",
"@babel/preset-env": "^7.0.0-beta.46",
"@babel/register": "^7.0.0-beta.46",
"babel-loader": "8.0.0-beta.2",
"cross-env": "^5.1.4",
"css-loader": "^0.28.11",
"devtron": "^1.4.0",
"electron": "^2.0.0",
"electron-builder": "^20.15.1",
"electron-debug": "^1.5.0",
"electron-rebuild": "^1.7.3",
"file-loader": "^1.1.11",
"html-loader": "^0.5.5",
"html-webpack-plugin": "^3.2.0",
"rimraf": "^2.6.2",
"vue-devtools": "^3.1.9",
"vue-loader": "^15.0.9",
"vue-template-compiler": "^2.5.16",
"webpack": "^4.8.0",
"webpack-cli": "^2.1.3",
"webpack-dev-server": "^3.1.4",
"webpack-merge": "^4.1.2"
}
}
我不知道我在做什么错。如果您需要更多信息,请询问
答案 0 :(得分:0)
您的package.json main指向“ main.js”,而不是“ app / main / index.js”。 更改该条目,然后尝试再次构建您的应用程序。