微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

javascript – 当我“服务”时,Angular CLI给我“TypeError:callbacks [i]不是函数”

我刚刚完成了Angular CLI的全新安装,以便尝试一下,我不知道是什么导致命令行上出现以下错误

    PC:cobros Fran$ng serve
** NG Live Development Server is listening on localhost:4200, open your browser on http://localhost:4200/ **
 95% emitting/Users/Fran/Documents/Workspace/Repos/cobros/node_modules/enhanced-resolve/lib/CachedInputFileSystem.js:40
        callbacks[i](err, result);
                    ^

TypeError: callbacks[i] is not a function
    at Storage.finished (/Users/Fran/Documents/Workspace/Repos/cobros/node_modules/enhanced-resolve/lib/CachedInputFileSystem.js:40:15)
    at /Users/Fran/Documents/Workspace/Repos/cobros/node_modules/enhanced-resolve/lib/CachedInputFileSystem.js:77:9
    at /Users/Fran/Documents/Workspace/Repos/cobros/node_modules/graceful-fs/polyfills.js:287:18
    at FSReqWrap.oncomplete (fs.js:153:5)

这是我在尝试“ng -v”时返回的信息(如果它有用的话):

Angular CLI: 1.6.8
Node: 8.9.0
OS: darwin x64
Angular: 5.2.4
... animations, common, compiler, compiler-cli, core, forms
... http, language-service, platform-browser
... platform-browser-dynamic, router

@angular/cli: 1.6.8
@angular-devkit/build-optimizer: 0.0.42
@angular-devkit/core: 0.0.29
@angular-devkit/schematics: 0.0.52
@ngtools/json-schema: 1.1.0
@ngtools/webpack: 1.9.8
@schematics/angular: 0.1.17
typescript: 2.5.3
webpack: 3.10.0

“增强型解决”模块甚至做了什么?
我安装角度错了吗?我按照https://github.com/angular/angular-cli的说明进行操作,确保我满足了先决条件.

解决方法:

编辑:问题现已修复,因此不再需要使用此解决方法.

解决方案(解决方法)发现here

将“copy-webpack-plugin”:“4.3.0”添加到package.json中

谢谢@neshkatrapati

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 [email protected] 举报,一经查实,本站将立刻删除。

相关推荐