我从那个种子开始我的项目:https://github.com/siteslave/clarity-angular4-electron
然后,我想升级到角度版本5并得到以下问题。
我不知道哪个模块会问这个插件。
我从angular-cli github repo看到了这个变化:https://github.com/angular/angular-cli/commit/8cea8ffdc28908b325d8a56f06ff3d626efdeb8d
任何人都有线索?
错误:
$ ng serve
Cannot find module '../../plugins/insert-concat-assets-webpack-plugin'
Error: Cannot find module '../../plugins/insert-concat-assets-webpack-plugin'
at Function.Module._resolveFilename (module.js:469:15)
at Function.Module._load (module.js:417:25)
at Module.require (module.js:497:17)
at require (internal/module.js:20:19)
at Object. (C:\myproject\node_modules@angular\cli\models\webpack-configs\common.js:7:47)
at Module._compile (module.js:570:32)
at Object.Module._extensions..js (module.js:579:10)
at Module.load (module.js:487:32)
at tryModuleLoad (module.js:446:12)
at Function.Module._load (module.js:438:3)
at Module.require (module.js:497:17)
at require (internal/module.js:20:19)
at Object. (C:\myproject\node_modules@angular\cli\models\webpack-configs\index.js:7:10)-configs\index.js:7:10)
at Module._compile (module.js:570:32)
at Object.Module._extensions..js (module.js:579:10)
at Module.load (module.js:487:32)
package.json
"dependencies": {
"@angular/animations": "~5.0.0",
"@angular/common": "~5.0.0",
"@angular/compiler": "~5.0.0",
"@angular/core": "~5.0.0",
"@angular/forms": "~5.0.0",
"@angular/http": "~5.0.0",
"@angular/platform-browser": "~5.0.0",
"@angular/platform-browser-dynamic": "~5.0.0",
"@angular/router": "~5.0.0",
"@clr/angular": "^0.11.0",
"@clr/icons": "^0.11.0",
"@clr/ui": "^0.11.0",
"@ngforage/ngforage-ng5": "^1.0.4",
"@ngx-translate/core": "^8.0.0",
"@ngx-translate/http-loader": "^2.0.1",
"@webcomponents/custom-elements": "^1.0.6",
"core-js": "^2.5.3",
"mutationobserver-shim": "^0.3.2",
"node-adodb": "^4.0.6",
"rxjs": "^5.5.6",
"zone.js": "^0.8.17"
},
"devDependencies": {
"@angular/cli": "~1.6.4",
"@angular/compiler-cli": "~5.0.0",
"@types/jasmine": "2.8.3",
"@types/node": "~8.5.7",
"bootstrap": "4.0.0-alpha.5",
"codelyzer": "~4.0.2",
"concurrently": "^3.5.1",
"cpx": "^1.5.0",
"electron": "^1.7.10",
"electron-packager": "^10.1.1",
"jasmine-core": "~2.8.0",
"jasmine-spec-reporter": "~4.2.1",
"karma": "~1.7.1",
"karma-chrome-launcher": "~2.2.0",
"karma-cli": "~1.0.1",
"karma-coverage-istanbul-reporter": "^1.3.0",
"karma-jasmine": "~1.1.0",
"karma-jasmine-html-reporter": "^0.2.2",
"protractor": "~5.1.2",
"ts-node": "~3.3.0",
"tslint": "~5.7.0",
"typescript": "~2.5.2"
}
答案 0 :(得分:0)
我遇到了类似的错误,需要一些时间让它再次运行。据我记得,将webpack保存为开发依赖项npm install --save-dev webpack
并运行npm install
为我工作
确保所有包都尽可能更新。我用了npm-check-updates。 ncu
列出所有过时的依赖项,ncu -x typescript -u -a
更新package.json
(不包括Typescript,因为Angular 5仅适用于Typescript 2.5.x)。更新package.json
后,您需要运行npm install
。
如果这不起作用,请尝试创建一个新的,干净的存储库克隆,然后运行ncu -x typescript -u -a
和npm install
。