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
标签:javascript,angular,npm,angular-cli 来源: https://codeday.me/bug/20190928/1826819.html