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

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

Open torsten-simon opened this issue 8 years ago • 10 comments

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

torsten-simon avatar Feb 08 '18 14:02 torsten-simon

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

JoshDSommer avatar Feb 08 '18 15:02 JoshDSommer

Yep. Same.

d2kx avatar Feb 08 '18 15:02 d2kx

Thanks @TheOriginalJosh , that helped for now!

torsten-simon avatar Feb 08 '18 15:02 torsten-simon

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.

ukon1990 avatar Feb 08 '18 15:02 ukon1990

Pinning to 1.6.7 addressed the issue for now.

n1ebrown avatar Feb 08 '18 15:02 n1ebrown

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

micahwood avatar Feb 08 '18 17:02 micahwood

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

micahwood avatar Feb 08 '18 17:02 micahwood

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

hansl avatar Feb 08 '18 20:02 hansl

@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)

leenMalka avatar May 01 '18 07:05 leenMalka

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.