必须在@ ngtools / webpack的配置中指定“ tsConfigPath”,从Angular 4迁移到6

时间:2018-07-31 13:50:08

标签: angular

我有Angular 4项目,所以我已经将其更新为Angular6。我使用了本指南:https://dev.to/chiangs/upgrading-to-angular-6-309p 不幸的是,有一个我无法解决的问题。

\frontend\node_modules\@ngtools\webpack\src\angular_compiler_plugin.js:73
            throw new Error('Must specify "tsConfigPath" in the configuration of @ngtools/webpack.');
            ^

Error: Must specify "tsConfigPath" in the configuration of @ngtools/webpack.
    at AngularCompilerPlugin._setupOptions (\frontend\node_modules\@ngtools\webpack\src\angular_compiler_plugin.js:73:19)
    at new AngularCompilerPlugin (\frontend\node_modules\@ngtools\webpack\src\angular_compiler_plugin.js:45:14)

    at Object.<anonymous> (\frontend\node_modules\webpack-dev-server\bin\webpack-dev-server.js:234:54)
    at Module._compile (internal/modules/cjs/loader.js:689:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:700:10)
    at Module.load (internal/modules/cjs/loader.js:599:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:538:12)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! charls@0.0.1 webpack-dev-server: `node --max_old_space_size=4096 node_modules/webpack-dev-server/bin/webpack-dev-server.js "--config" "config/webpack.dev.js" "--open" "--progress" "--profile" "--watch" "--content-base" "src/"`
npm ERR! Exit status 1
npm ERR!

我已经读到@ngtools可能存在的问题,但是不幸的是我看不到解决方案。

https://github.com/angular/ngtools-webpack-builds-这对我不起作用(或者这只是我的运气,我在一周前:D开始学习有角度的知识)。

谢谢!

0 个答案:

没有答案