Typings errors and can't import modules
See original GitHub issueBug, feature request, or proposal:
Get the given error below when i run ng serve
in my angular project.
What is the expected behavior?
To start up and serve my app.
What is the current behavior?
I get this error:
ERROR in /Users/rickardborjesson/Desktop/GreatSigns/angular-src/node_modules/@angular/material/dialog/typings/dialog-config.d.ts (22,40): ',' expected.
ERROR in /Users/rickardborjesson/Desktop/GreatSigns/angular-src/node_modules/@angular/material/dialog/typings/dialog-config.d.ts (22,42): Type parameter name cannot be 'any'
ERROR in /Users/rickardborjesson/Desktop/GreatSigns/angular-src/node_modules/@angular/material/dialog/typings/dialog-container.d.ts (36,14): Generic type 'MatDialogConfig<D, any>' requires 2 type argument(s).
ERROR in /Users/rickardborjesson/Desktop/GreatSigns/angular-src/node_modules/@angular/material/dialog/typings/dialog.d.ts (50,15): ',' expected.
ERROR in /Users/rickardborjesson/Desktop/GreatSigns/angular-src/node_modules/@angular/material/dialog/typings/dialog.d.ts (50,17): Type parameter name cannot be 'any'
ERROR in /Users/rickardborjesson/Desktop/GreatSigns/angular-src/node_modules/@angular/material/dialog/typings/dialog.d.ts (50,90): Generic type 'MatDialogConfig<D, any>' requires 2 type argument(s).
ERROR in RangeError: Maximum call stack size exceeded
at isRelatedTo (/Users/rickardborjesson/Desktop/GreatSigns/angular-src/node_modules/typescript/lib/typescript.js:31539:33)
at isRelatedTo (/Users/rickardborjesson/Desktop/GreatSigns/angular-src/node_modules/typescript/lib/typescript.js:31645:38)
at isRelatedTo (/Users/rickardborjesson/Desktop/GreatSigns/angular-src/node_modules/typescript/lib/typescript.js:31619:42)
at isRelatedTo (/Users/rickardborjesson/Desktop/GreatSigns/angular-src/node_modules/typescript/lib/typescript.js:31680:42)
at isRelatedTo (/Users/rickardborjesson/Desktop/GreatSigns/angular-src/node_modules/typescript/lib/typescript.js:31645:38)
at isRelatedTo (/Users/rickardborjesson/Desktop/GreatSigns/angular-src/node_modules/typescript/lib/typescript.js:31619:42)
at isRelatedTo (/Users/rickardborjesson/Desktop/GreatSigns/angular-src/node_modules/typescript/lib/typescript.js:31680:42)
at isRelatedTo (/Users/rickardborjesson/Desktop/GreatSigns/angular-src/node_modules/typescript/lib/typescript.js:31645:38)
at isRelatedTo (/Users/rickardborjesson/Desktop/GreatSigns/angular-src/node_modules/typescript/lib/typescript.js:31619:42)
at isRelatedTo (/Users/rickardborjesson/Desktop/GreatSigns/angular-src/node_modules/typescript/lib/typescript.js:31680:42)
at isRelatedTo (/Users/rickardborjesson/Desktop/GreatSigns/angular-src/node_modules/typescript/lib/typescript.js:31645:38)
at isRelatedTo (/Users/rickardborjesson/Desktop/GreatSigns/angular-src/node_modules/typescript/lib/typescript.js:31619:42)
at isRelatedTo (/Users/rickardborjesson/Desktop/GreatSigns/angular-src/node_modules/typescript/lib/typescript.js:31680:42)
at isRelatedTo (/Users/rickardborjesson/Desktop/GreatSigns/angular-src/node_modules/typescript/lib/typescript.js:31645:38)
at isRelatedTo (/Users/rickardborjesson/Desktop/GreatSigns/angular-src/node_modules/typescript/lib/typescript.js:31619:42)
at isRelatedTo (/Users/rickardborjesson/Desktop/GreatSigns/angular-src/node_modules/typescript/lib/typescript.js:31680:42)
What are the steps to reproduce?
I could link my repo but not if it’s unnecessary.
What is the use-case or motivation for changing an existing behavior?
I just want to know if this error know or not
Which versions of Angular, Material, OS, TypeScript, browsers are affected?
@angular/cli: 1.4.9 node: 6.11.2 os: darwin x64 @angular/animations: 4.4.6 @angular/cdk: 2.0.0-beta.12-65d3630 @angular/common: 4.4.6 @angular/compiler: 4.4.6 @angular/core: 4.4.6 @angular/forms: 4.4.6 @angular/http: 4.4.6 @angular/material: 2.0.0-beta.12-65d3630 @angular/platform-browser: 4.4.6 @angular/platform-browser-dynamic: 4.4.6 @angular/router: 4.4.6 @angular/cli: 1.4.9 @angular/compiler-cli: 4.4.6 typescript: 2.2.2
Is there anything else we should know?
Im not using the the material Dialog. I just noticed that I get this error message: node_modules/@angular/material/material"' has no exported member 'MdProgressSpinnerModule'.
when i try to import modules in my app.module.ts file:
app.module.ts
...
import { MdButtonModule,
MdSlideToggleModule,
MdRadioModule,
MdProgressSpinnerModule,
MdCheckboxModule } from '@angular/material';
...
Issue Analytics
- State:
- Created 6 years ago
- Comments:9 (1 by maintainers)
Top GitHub Comments
Update all
@angular
dependencies to5.1.2
andtypescript
to2.4.0
This fixed my issues for me, remember and run
rm-rf /node_modules && npm i
to delete yournode_modules
and then install with latestThis 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.