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

The same here

aromero86 avatar Feb 08 '18 11:02 aromero86

Same issue here

ghost avatar Feb 08 '18 11:02 ghost

Linked to #9549

rsaenen avatar Feb 08 '18 11:02 rsaenen

Same here :(

pedrokelvin avatar Feb 08 '18 11:02 pedrokelvin

Show we revert to a previous version?

JoSeTe4ever avatar Feb 08 '18 11:02 JoSeTe4ever

Same here yesterday it worked but today I m also getting same error.

Rahulkr2 avatar Feb 08 '18 11:02 Rahulkr2

same. just got this error today.

destiny07 avatar Feb 08 '18 11:02 destiny07

First time I'm trying Angular. Not a good day lol

pedrokelvin avatar Feb 08 '18 11:02 pedrokelvin

I'm in the same boat with @pedrokelvin

Rookwing avatar Feb 08 '18 11:02 Rookwing

Same!

hudzenko avatar Feb 08 '18 11:02 hudzenko

Same here - it was working fine on yesterday. My setup:

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

@angular/cli: 1.5.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.8.5
@schematics/angular: 0.1.17
typescript: 2.7.1
webpack: 3.8.1

brunano21 avatar Feb 08 '18 11:02 brunano21

I have the same problem.

.../node_modules/enhanced-resolve/lib/CachedInputFileSystem.js:40
		callbacks[i](err, result);
		            ^
TypeError: callbacks[i] is not a function

Versions

@angular/core": "^5.2.4 @angular/cli": "^1.6.8 Node 9.4.0

Dependencies

"webpack": "3.10.0", "enhanced-resolve": "3.4.1",

RafaPegorari avatar Feb 08 '18 11:02 RafaPegorari

Please use reactions for "me too" comments. My inbox would appreciate it, thanks!

tsvetomir avatar Feb 08 '18 11:02 tsvetomir

Me too

vovcyan avatar Feb 08 '18 11:02 vovcyan

Me too

kodermax avatar Feb 08 '18 11:02 kodermax

Me too

Rahulkr2 avatar Feb 08 '18 11:02 Rahulkr2

Me too. But, could not get it working even with the previous version

neshkatrapati avatar Feb 08 '18 11:02 neshkatrapati

@skorunka tried the same — didn't work for me

# ng --version

    _                      _                 ____ _     ___
   / \   _ __   __ _ _   _| | __ _ _ __     / ___| |   |_ _|
  / △ \ | '_ \ / _` | | | | |/ _` | '__|   | |   | |    | |
 / ___ \| | | | (_| | |_| | | (_| | |      | |___| |___ | |
/_/   \_\_| |_|\__, |\__,_|_|\__,_|_|       \____|_____|___|
               |___/
    
Angular CLI: 1.6.7
Node: 9.3.0
OS: darwin x64
Angular: 5.2.0
... animations, common, compiler, compiler-cli, core, forms
... http, language-service, platform-browser
... platform-browser-dynamic, router

@angular/cli: 1.6.7
@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.7
@schematics/angular: 0.1.17
typescript: 2.5.3
webpack: 3.10.0
# ng serve

** NG Live Development Server is listening on localhost:4200, open your browser on http://localhost:4200/ **
 95% emitting/Users/nide/Code/hubs/node_modules/enhanced-resolve/lib/CachedInputFileSystem.js:40
		callbacks[i](err, result);
		            ^

TypeError: callbacks[i] is not a function
    at Storage.finished (/Users/nide/Code/hubs/node_modules/enhanced-resolve/lib/CachedInputFileSystem.js:40:15)
    at /Users/nide/Code/hubs/node_modules/enhanced-resolve/lib/CachedInputFileSystem.js:77:9
    at /Users/nide/Code/hubs/node_modules/graceful-fs/polyfills.js:287:18
    at FSReqWrap.oncomplete (fs.js:167:5)

gvidon avatar Feb 08 '18 11:02 gvidon

Looks like something is superbroken, but i don't know what to do. I tried to downgrade cli to 1.6.7 but it didn't work. People is having the same problem even with CLI 1.5, so i think this might be an Angular problem, not only CLI.

bop10 avatar Feb 08 '18 11:02 bop10

https://github.com/angular/angular-cli/blob/8ff95333aee20b946b55ec2f959b41cd4608401d/package.json#L59

Those who use semver are probably big fans of issues described in this thread.

  • Stop using semver!
  • setup greenkeeper or similar software.

gvidon avatar Feb 08 '18 11:02 gvidon