Angular-CLI ng serve 错误

3

angular-cli曾经运行得很完美,但现在我不知道为什么当创建一个新项目时它没有运行服务器。

我尝试重新安装angular-cli。

我用ng new app创建了一个新应用程序。 我进入/app/路径,运行ng serve,结果出现:

No errors
Error: No errors
    at validate (C:\Users\Gasti\Documents\Prgm\githubsearch\node_modules\extract-text-webpack-plugin\schema\validator.js:10:9)
    at Function.ExtractTextPlugin.extract (C:\Users\Gasti\Documents\Prgm\githubsearch\node_modules\extract-text-webpack-plugin\index.js:188:3)
    at C:\Users\Gasti\Documents\Prgm\githubsearch\node_modules\angular-cli\models\webpack-build-styles.js:79:83
    at Array.map (native)
    at Object.getWebpackStylesConfig (C:\Users\Gasti\Documents\Prgm\githubsearch\node_modules\angular-cli\models\webpack-build-styles.js:76:43)
    at new NgCliWebpackConfig (C:\Users\Gasti\Documents\Prgm\githubsearch\node_modules\angular-cli\models\webpack-config.js:44:51)
    at Class.run (C:\Users\Gasti\Documents\Prgm\githubsearch\node_modules\angular-cli\tasks\serve-webpack.js:23:22)
    at C:\Users\Gasti\Documents\Prgm\githubsearch\node_modules\angular-cli\commands\serve.run.js:37:22
    at process._tickCallback (internal/process/next_tick.js:103:7)
1个回答

9

来自Angular CLI开发者的消息:

这个问题是由于最近一个外部依赖项的更新引起的,现在没有办法解决,需要等待CLI发布。

他还确认了解决方法是安装版本为2.0.0-rc.0的依赖项:

npm install extract-text-webpack-plugin@2.0.0-rc.0 --save-dev

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接