Reputation: 43
Using Angular 6, I am having trouble with my material-moment-adapter. In my moment-date-adapter.d.ts file it shows that "'module' cannot be found" on my import statements when trying to import { Moment } from
node_modules/@angular/material-moment-adapter/typings/adapter/moment-date-adapter.d.ts.
My tsconfig.json is as follows:
{
"compileOnSave": false,
"compilerOptions": {
"baseUrl": "./",
"outDir": "./dist/out-tsc",
"sourceMap": true,
"declaration": false,
"module": "es2015",
"moduleResolution": "node",
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"target": "es5",
"typeRoots": [
"node_modules/@types"
],
"lib": [
"es2017",
"dom"
]
}
}
My import statement is simply
import { Moment } from 'moment';
from my moment-date-adapter.d.ts file.
Any help would be appreciated.
Upvotes: 4
Views: 5711