angular-cli icon indicating copy to clipboard operation
angular-cli copied to clipboard

Ng Serve fails at 95% - TypeError: callbacks[i] is not a function

Open DanielStep opened this issue 8 years ago • 184 comments

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

DanielStep avatar Feb 08 '18 11:02 DanielStep

same problem here... we are blocked on so many levels!

demiro avatar Feb 08 '18 11:02 demiro

same for me

yacineblr avatar Feb 08 '18 12:02 yacineblr

same problem here too... :(

Sushikant avatar Feb 08 '18 12:02 Sushikant

some other deps prevent me from using 1.6.6 which worked until today. so the issue might have gotten pulled in from the outside, I hate the way npm resolves, and even pinning 1.6.6 in my package.json results in 1.6.8 being installed

DooMMasteR avatar Feb 08 '18 12:02 DooMMasteR

same problem here :(

VytenisJ avatar Feb 08 '18 12:02 VytenisJ

A rollback to ~1.3.0 in your package.json fixes the issue for me as it removes the dependency on copy-webpack-plugin but it's not exactly something I want to keep long term.

cmvalentine avatar Feb 08 '18 12:02 cmvalentine

Same here and I had the same problem last month with angular-cli 1.5.x (but a different issue: angular-devkit/core not found). Now I'm using 1.6.6 but it worked until yesterday

fabiobiondi avatar Feb 08 '18 12:02 fabiobiondi

same for me!

Angular CLI: 1.5.5
Node: 6.11.0
OS: win32 x64
Angular: 4.4.6
... animations, common, compiler, compiler-cli, core, forms
... http, language-service, platform-browser
... platform-browser-dynamic, router, tsc-wrapped

@angular/cli: 1.5.5
@angular-devkit/build-optimizer: 0.0.41
@angular-devkit/core: 0.0.28
@angular-devkit/schematics: 0.0.51
@ngtools/json-schema: 1.1.0
@ngtools/webpack: 1.8.5
@schematics/angular: 0.1.16
typescript: 2.6.2
webpack: 3.8.1

idukic avatar Feb 08 '18 12:02 idukic

Same here

SVMickey avatar Feb 08 '18 12:02 SVMickey

I have same problem :(

ssapen avatar Feb 08 '18 12:02 ssapen

same problem when update to 1.6.8

mbx2015 avatar Feb 08 '18 12:02 mbx2015

Rolling back copy-webpack-plugin to 4.3.0 works.

neshkatrapati avatar Feb 08 '18 12:02 neshkatrapati

Same problem. [offtopic] This whole system with 10000 needed packages and semversioning not used properly feels like such a pain in the ass... [/offtopic]

ghost avatar Feb 08 '18 12:02 ghost

Can confirm the same here - it's holding up our release today

gamebenchjake avatar Feb 08 '18 12:02 gamebenchjake

Downgrading isn't working for me.

winstonzhao avatar Feb 08 '18 12:02 winstonzhao

@neshkatrapati works perfectly now!

gvidon avatar Feb 08 '18 12:02 gvidon

its working when i downgrade to 1.3.2

@angular/cli: 1.3.2 node: 9.2.1 os: linux x64 @angular/animations: 5.2.0 @angular/common: 5.2.0 @angular/compiler: 5.2.0 @angular/core: 5.2.0 @angular/forms: 5.2.0 @angular/http: 5.2.0 @angular/platform-browser: 5.2.0 @angular/platform-browser-dynamic: 5.2.0 @angular/router: 5.2.0 @angular/cli: 1.3.2 @angular/compiler-cli: 5.2.0 @angular/language-service: 5.2.0

macwac avatar Feb 08 '18 12:02 macwac

Same for me

95% emitting/vagrant/talis/shipshape-app/node_modules/enhanced-resolve/lib/CachedInputFileSystem.js:40
		callbacks[i](err, result);
		            ^

TypeError: callbacks[i] is not a function
    at Storage.finished (/vagrant/talis/shipshape-app/node_modules/enhanced-resolve/lib/CachedInputFileSystem.js:40:15)
    at /vagrant/talis/shipshape-app/node_modules/enhanced-resolve/lib/CachedInputFileSystem.js:77:9
    at /vagrant/talis/shipshape-app/node_modules/graceful-fs/polyfills.js:287:18
    at FSReqWrap.oncomplete (fs.js:154:5)

./node_modules/.bin/ng --version                                                                                                                
Angular CLI: 1.6.5
Node: 8.6.0
OS: darwin x64
Angular: 5.2.2
... common, compiler, compiler-cli, core, forms, http
... language-service, platform-browser, platform-browser-dynamic
... router

@angular/cdk: 5.1.0
@angular/cli: 1.6.5
@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.5
@schematics/angular: 0.1.17
typescript: 2.6.2
webpack: 3.10.0

kiyanwang avatar Feb 08 '18 12:02 kiyanwang

@MadeRelevant U'r so right.. i think this is critical, the Angular team should fix this as fast as possible. Downgrading from 1.6.8 to 1.3.2 is a sad solution even if works.

bop10 avatar Feb 08 '18 12:02 bop10

Downgrading to 1.3.2 is not an option for me: ERROR in Please update @angular/cli. Angular 5+ requires at least Angular CLI 1.5+

gokulm avatar Feb 08 '18 12:02 gokulm