我正在尝试构建我的angular2项目以进行制作,但我收到了以下错误: -
C:\Official\UI\angular3>C:\Official\Software\node-v7.8.0-win-x64\ng build -prod -aot
Cannot read property 'config' of null
TypeError: Cannot read property 'config' of null
at Class.run (C:\Official\UI\angular3\node_modules\@angular\cli\tasks\build.js:14:56)
at Class.run (C:\Official\UI\angular3\node_modules\@angular\cli\commands\build.js:162:26)
at resolve (C:\Official\UI\angular3\node_modules\@angular\cli\ember-cli\lib\models\command.js:273:20)
at Class.validateAndRun (C:\Official\UI\angular3\node_modules\@angular\cli\ember-cli\lib\models\command.js:251:12)
at Promise.resolve.then.then (C:\Official\UI\angular3\node_modules\@angular\cli\ember-cli\lib\cli\cli.js:157:24)
at tryCatch (C:\Official\UI\angular3\node_modules\rsvp\dist\rsvp.js:525:12)
at invokeCallback (C:\Official\UI\angular3\node_modules\rsvp\dist\rsvp.js:538:13)
at publish (C:\Official\UI\angular3\node_modules\rsvp\dist\rsvp.js:508:7)
at flush (C:\Official\UI\angular3\node_modules\rsvp\dist\rsvp.js:2415:5)
at _combinedTickCallback (internal/process/next_tick.js:73:7)
at process._tickCallback (internal/process/next_tick.js:104:9)
这是我的Package.json: -
"dependencies": {
"@angular/common": "4.3.2",
"@angular/compiler": "4.3.2",
"@angular/core": "4.3.2",
"@angular/forms": "4.3.2",
"@angular/http": "4.3.2",
"@angular/platform-browser": "4.3.2",
"@angular/platform-browser-dynamic": "4.3.2",
"@angular/router": "3.0.0-rc.1",
"@angular/router-deprecated": "2.0.0-rc.2",
"angular": "^1.6.4",
"angular2": "^2.0.0-beta.21",
"angular2-in-memory-web-api": "0.0.15",
"bootstrap": "^3.3.6",
"core-js": "^2.4.0",
"reflect-metadata": "^0.1.3",
"rxjs": "^5.0.0-beta.6",
"systemjs": "^0.19.27",
"zone.js": "^0.8.4",
"ng2-bootstrap": "^1.0.17",
"ng2-translate": "2.4.1",
"typescript": "~2.2.0"
},
"devDependencies": {
"@angular/cli": "^1.2.6",
"@angular/compiler-cli": "^4.3.2",
"concurrently": "^2.2.0",
"lite-server": "^2.3.0",
"typescript": "~2.2.0"
}
有人可以帮我吗?我没有得到什么问题。我甚至试图删除node_module文件夹并重新安装它,但都是徒劳的。
我刚用同一个package.json创建了一个空的新项目,它根本没有我的代码,但它仍然给我同样的错误。不确定是否因为我的package.json文件中的版本不匹配。