Ng Serve fails at 95% - TypeError: callbacks[i] is not a function
Versions
Angular CLI: 1.6.8
Node: 9.5.0
OS: darwin x64
Angular: 5.2.4
@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
MacOS High Sierra 10.13.3
Repro steps
MacBook-Pro:~ daniel$ ng new test-proj ... Installed packages for tooling via npm. Successfully initialized git. Project 'test-proj' successfully created.
MacBook-Pro:~ daniel$ cd test-proj/
MacBook-Pro:test-proj daniel$ npm install up to date in 6.008s
MacBook-Pro:test-proj daniel$ ng serve
Observed behavior
** NG Live Development Server is listening on localhost:4200, open your browser on http://localhost:4200/ **
95% emitting/Users/daniel/test-proj/node_modules/enhanced-resolve/lib/CachedInputFileSystem.js:40
callbacks[i](err, result);
^
TypeError: callbacks[i] is not a function
at Storage.finished (/Users/daniel/test-proj/node_modules/enhanced-resolve/lib/CachedInputFileSystem.js:40:15)
at /Users/daniel/test-proj/node_modules/enhanced-resolve/lib/CachedInputFileSystem.js:77:9
at /Users/daniel/test-proj/node_modules/graceful-fs/polyfills.js:287:18
at FSReqWrap.oncomplete (fs.js:167:5)
Desired behavior
For build to be 100% successful and served to browser
@amithole1987 "typescript": "^2.5.3", "@angular/cli": "^1.6.0", "@angular/compiler-cli": "^4.4.5",
it seems to work now!
Now arrived v4.4.1 💃 https://www.npmjs.com/package/copy-webpack-plugin Now it hasn't this bug!
$ npm install [email protected] This command worked for me..
Hi all,
[email protected] was just released with a fix that addresses this problem (https://github.com/webpack-contrib/copy-webpack-plugin/pull/221).
A big thanks to the Webpack folks, especially @evilebottnawi, for looking investigating this problem and releasing a new version so quickly.
Using npm, follow these steps to force update:
npm install [email protected]npm uninstall [email protected]installing and uninstalling should force the npm to resolve and dedupe to4.4.1npm ls copy-webpack-pluginshould show[email protected]installed
I used npm 5.6.0 for this, and recommend you use at least that version as well since it has lockfile support and solves some npm problems with windows.
@kylecordes has also offered some advice for Yarn users in https://github.com/angular/angular-cli/issues/9550#issuecomment-364110779.
I'd like to remind everyone that you only have reproducible installs if you use a lockfile. Both NPM v5+ and Yarn support lockfiles. If your CI works one day but not the next and you did not change your code or package.json, it is likely because one of your dependencies had a bad release and you did not have a lockfile.
It is your responsibility as a library consumer to use lockfiles. No one wants to do a release with bugs but it sometimes happens, and the best we can do is to fix it as fast as possible with a new release. When you have a couple of thousand total dependencies it is only a matter of time until one of them has a bad release.
I am going to close this topic for now so that my answer will be the most visible for anyone experiencing this issue.
I'm sorry to remove your ability to comment on it but for new users it would be very hard to find the solution with so many comments coming up. I will reopen in a few hours.
New release!! from copy-webpack-plugin https://github.com/webpack-contrib/copy-webpack-plugin/releases/tag/v4.4.1 Fixed!
Leaving issue opened for now to increase visibility, but will close later when reopening comments. For any new users coming into this issue, please check my comment just above regarding the resolution.
the only way to resolve this issue is to use a previous version of the @angular/cli. Which is version 1.6.1 and before
I have only been able to solve this as well by reverting version of @angular/cli to 1.60 or 1.6.1. I have this issue for more clarity but relates to the topic here: TypeError: fromJSON_1.default is not a function
Uninstall and reinstall angular cli again. Issue is already solved
This has been solved by a new release of the copy webpack plugin.
With me, works only after reinstalling @angular/cli and, in addition, delete package-lock.json, remove node_modules and reinstall packages
deleting package-lock.json and npm install [email protected] worked for us. Cheers!!!
So, I was facing the same problem. What I did
npm uninstall -g @angular/cli
npm cache clean --force
npm install -g @angular/cli
It is working now. Cheers
I made downgrade compiler-cli up to 5.2.3 and I started
After updating and trying build version still got this error

Hi team, have you planned a patch in the angular-cli in order to fix this issue? thank you in advance.
@albertnadal a patch isn't required to fix this issue as it was to do with a dependency which has now fixed, npm install / clearing npm cache then installing should fix the issue
npm install [email protected]
Work for Me there are my configuration
Angular CLI: 1.6.8 Node: 8.9.4 OS: win32 x64 Angular: 5.2.1 ... 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
Thank's