javascript - angular-cli ng 服务错误

标签 javascript angular angular-cli

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)

最佳答案

来自 an Angular CLI developer :

This problem arises from a recent update in a external dependency and it's not fixable without a CLI release right now.

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

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

关于javascript - angular-cli ng 服务错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41910340/

相关文章:

javascript - 在 Electron 中互连 ipcRenderer 和 ipcMain 时出错

css - 使用 angular-cli 构建是否会添加新的用户代理样式表?

Angular 2 和 Angular Cli tree shaking 生产构建,vendor.js 巨大

javascript - konvajs:拖放后项目位置不会改变

javascript - THREE.js 通过对象克隆实现多个 Canvas 的多个 View 。陷阱?

javascript - 如何划分数组?

javascript - 如何在D3中旋转图形?

Angularjs 2 组件属性未定义

Angular 2 新路由器 - 检测 404

angular - ERROR in Metadata version mismatch for module X found version 4, expected 3, resolving symbol Y