x)- [X] bug report -> please search issues before submitting
- [ ] feature request
Node 8.1.0
NPM 5.0.3
ngtools/webpack 1.7.0-beta.2
Angular 5.0.0-beta.2
Typescript 2.4.2
TS2420: Class 'VirtualStats' incorrectly implements interface 'Stats'.
Property 'atimeMs' is missing in type 'VirtualStats'.
Compiles correctly
I have the same problem.
It only happens with awesome-typescript-loader.
Switching to ts-loader resolved the problem for me.
I just tried changing to ts-loader, same error. Care to share your part of the config that you have setup, see if I am doing it right.
Temporary solved it by adding the following attributed from fs.Stats to the VirtualStats class
readonly atimeMs: number;
readonly mtimeMs: number;
readonly ctimeMs: number;
readonly birthtimeMs: number;
Seems like the node api changed..
Using:
Downgrading to @types/node 8.0.19 temporary solved the problem.
Unfortunately still an issue. :(
You can work around this without downgrading @types/node by adding the following to a .d.ts file, and making sure that file is included in your tsconfig.json:
// https://github.com/angular/angular-cli/issues/7474
import { VirtualStats } from '@ngtools/webpack/src/compiler_host';
import * as fs from 'fs';
declare module '@ngtools/webpack/src/compiler_host' {
interface VirtualStats extends fs.Stats {
atimeMs: number;
}
}
Can you still reproduce this error?
Closing the issue due to inactivity. If the problem still exists in the latest version of the CLI, please open a new issue following the template and providing a minimal demo where we can reproduce it. Thanks! :-)
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._
Most helpful comment
Downgrading to
@types/node8.0.19 temporary solved the problem.