Я пытаюсь создать электронное приложение, используя angular, TypeORM, SQLite и другие компоненты в качестве веб-пакета.
Я начал свою разработку с примера, найденного на GitHub: https://github.com/CubikNeRubik/angular-electron-typeorm-starter .
Через некоторое время я решил обновить angular с 8.0 до 8.2. Тогда было невозможно запустить мое приложение. У меня ошибка «ReferenceError: путь не определен».
Я перезапустился с версии 8.0 angular. Ничего не меняя, приложение запускается нормально.
Я обновил проект с помощью команды "npm update".
Затем я получил эту ошибку:
[error] ReferenceError: path is not defined
at Object.getBrowserConfig (/Volumes/Data/ProjetNodes/TestUpdate/node_modules/@angular-devkit/build-angular/src/angular-cli-files/models/webpack-configs/browser.js:62:22)
at webpack_browser_config_1.generateBrowserWebpackConfigFromContext.wco (/Volumes/Data/ProjetNodes/TestUpdate/node_modules/@angular-devkit/build-angular/src/browser/index.js:55:27)
at scriptTargets.map.scriptTarget (/Volumes/Data/ProjetNodes/TestUpdate/node_modules/@angular-devkit/build-angular/src/utils/webpack-browser-config.js:69:26)
at Array.map (<anonymous>)
at generateWebpackConfig (/Volumes/Data/ProjetNodes/TestUpdate/node_modules/@angular-devkit/build-angular/src/utils/webpack-browser-config.js:33:26)
at process._tickCallback (internal/process/next_tick.js:68:7)
at Function.Module.runMain (internal/modules/cjs/loader.js:832:11)
at startup (internal/bootstrap/node.js:283:19)
at bootstrapNodeJSCore (internal/bootstrap/node.js:622:3)
Может ли кто-нибудь объяснить мою ошибку?
Здесь версия модулей, использованная до обновления:
"dependencies": {
"sqlite3": "^4.0.9",
"typeorm": "^0.2.18"
},
"devDependencies": {
"@angular-builders/custom-webpack": "^8.0.2",
"@angular-devkit/architect": "^0.800.3",
"@angular-devkit/build-angular": "^0.800.3",
"@angular-devkit/core": "^8.0.3",
"@angular/animations": "^8.0.1",
"@angular/cdk": "^8.0.1",
"@angular/cli": "~8.0.3",
"@angular/common": "^8.0.1",
"@angular/compiler": "^8.0.1",
"@angular/compiler-cli": "^8.0.1",
"@angular/core": "^8.0.1",
"@angular/forms": "^8.0.1",
"@angular/http": "^7.0.0",
"@angular/language-service": "^8.0.1",
"@angular/material": "^8.0.1",
"@angular/platform-browser": "^8.0.1",
"@angular/platform-browser-dynamic": "^8.0.1",
"@angular/router": "^8.0.1",
"@types/node": "~12.0.8",
"angular-cli-builders": "^2.1.2",
"codelyzer": "~5.1.0",
"commonjs": "0.0.1",
"copy-webpack-plugin": "^5.0.3",
"core-js": "^3.1.4",
"electron": "^5.0.4",
"electron-builder": "^20.44.2",
"electron-reload": "^1.4.0",
"fs": "0.0.1-security",
"hammerjs": "^2.0.8",
"npm-run-all": "4.1.5",
"npx": "^10.2.0",
"rxjs": "^6.5.2",
"stream": "0.0.2",
"ts-node": "~8.3.0",
"tslint": "~5.17.0",
"typescript": "^3.4.5",
"wait-on": "3.2.0",
"webpack": "^4.34.0",
"zone.js": "^0.9.1"
}
Версия после обновления:
"dependencies": {
"sqlite3": "^4.1.1",
"typeorm": "^0.2.22"
},
"devDependencies": {
"@angular-builders/custom-webpack": "^8.4.1",
"@angular-devkit/architect": "^0.800.6",
"@angular-devkit/build-angular": "^0.803.25",
"@angular-devkit/core": "^8.3.25",
"@angular/animations": "^8.2.14",
"@angular/cdk": "^8.2.3",
"@angular/cli": "~8.3.25",
"@angular/common": "^8.2.14",
"@angular/compiler": "^8.2.14",
"@angular/compiler-cli": "^8.2.14",
"@angular/core": "^8.2.14",
"@angular/forms": "^8.2.14",
"@angular/http": "^7.2.16",
"@angular/language-service": "^8.2.14",
"@angular/material": "^8.2.3",
"@angular/platform-browser": "^8.2.14",
"@angular/platform-browser-dynamic": "^8.2.14",
"@angular/router": "^8.2.14",
"@types/node": "^12.0.12",
"angular-cli-builders": "^2.1.2",
"codelyzer": "^5.1.2",
"commonjs": "0.0.1",
"copy-webpack-plugin": "^5.1.1",
"core-js": "^3.6.4",
"electron": "^5.0.13",
"electron-builder": "^20.44.4",
"electron-reload": "^1.5.0",
"fs": "0.0.1-security",
"hammerjs": "^2.0.8",
"npm-run-all": "4.1.5",
"npx": "^10.2.2",
"rxjs": "^6.5.4",
"stream": "0.0.2",
"ts-node": "~8.3.0",
"tslint": "~5.17.0",
"typescript": "^3.5.3",
"wait-on": "3.2.0",
"webpack": "^4.41.6",
"zone.js": "^0.9.1"
}