Angular-cli: TypeError: Cannot read property 'apply' of undefined in CachedInputFileSystem.js

Created on 8 Feb 2018  路  10Comments  路  Source: angular/angular-cli

Versions

Angular CLI: 1.6.8
Node: 8.9.4
OS: win32 x64
Angular: 5.2.4
... animations, common, compiler, compiler-cli, core, forms
... http, 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.4.2
webpack: 3.10.0

Repro steps

Running ng server or ng build on the project
Use the repository from here:
https://github.com/tsimon-edu-sharing/cli-sample

Observed behavior

** NG Live Development Server is listening on localhost:4200, open your browser on http://localhost:4200/ **
 95% emittingC:\Users\project\node_modules\enhanced-resolve\lib\CachedInputFileSystem.js:70
                                callback.apply(null, data);
                                         ^

TypeError: Cannot read property 'apply' of undefined
    at C:\Users\project\node_modules\enhanced-resolve\lib\CachedInputFileSystem.js:70:14
    at _combinedTickCallback (internal/process/next_tick.js:131:7)
    at process._tickCallback (internal/process/next_tick.js:180:9)

Desired behavior

Should run / build, or give a more useful error

Mention any other details that might be useful (optional)

Reason seems to have something to do with including the font stylesheet via the angular-cli.json

Most helpful comment

I'm having the same problem with the latest version of the Angular CLI (1.6.8). I've resolved this by temporarily setting the Angular CLI version in my package.json to 1.6.7

All 10 comments

I'm having the same problem with the latest version of the Angular CLI (1.6.8). I've resolved this by temporarily setting the Angular CLI version in my package.json to 1.6.7

Yep. Same.

Thanks @TheOriginalJosh , that helped for now!

Hmm odd.. I seemed to have the same issue. but then it was suddenly gone... Can't say that I did any changes other than trying to revert stuff to older versions and then resat it back to where it all started.

Pinning to 1.6.7 addressed the issue for now.

I experienced this issue briefly while still on 1.6.6, and like everyone else it went away on it's own.

Looks like it was an issue with [email protected]. Once it started working again it installed 4.4.1 which fixed this issue.

https://github.com/webpack-contrib/copy-webpack-plugin/pull/221

Closing this as fixed in copy-webpack-plugin. Please update your node_modules folder and you should be good to go.

@TheOriginalJosh
Hey I tried your answer to change version of angular/cli
but the still throw this error

95% emittingX:\NewClalWeb\base-project\node_modules\enhanced-resolve\lib\CachedInputFileSystem.js:70
callback.apply(null, data);
^
TypeError: Cannot read property 'apply' of undefined

at X:\NewClalWeb\base-project\node_modules\enhanced-resolve\lib\CachedInputFileSystem.js:70:14

at _combinedTickCallback (internal/process/next_tick.js:131:7)

at process._tickCallback (internal/process/next_tick.js:180:9)

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

_This action has been performed automatically by a bot._

Was this page helpful?
0 / 5 - 0 ratings