@angular/forms/src/directives.d.ts:27:49 Generic type 'Type<T>' requires 1 type argument(s)
See original GitHub issueI’m submitting a … (check one with “x”)
[X] bug report => search github for a similar issue or PR before submitting
[ ] feature request
Current behavior
I upgraded Node and NPM and reinstalled Angular CLI (angular-cli: 1.0.0-beta.11-webpack.8, node: 6.5.0, os: linux x64), generated a trivial foo
project which worked fine. Then I bumped Angular 2 to RC.6 and got this error:
jan@linux-zd16:~/src/fm-repos/foo> ng serve
ERROR in [default] /home/jan/src/fm-repos/foo/node_modules/@angular/forms/src/directives.d.ts:26:45
Generic type 'Type<T>' requires 1 type argument(s).
ERROR in [default] /home/jan/src/fm-repos/foo/node_modules/@angular/forms/src/directives.d.ts:27:49
Generic type 'Type<T>' requires 1 type argument(s).
ERROR in [default] /home/jan/src/fm-repos/foo/node_modules/@angular/forms/src/directives.d.ts:28:49
Generic type 'Type<T>' requires 1 type argument(s).
Expected/desired behavior I’m expecting a clean build with no compilation errors.
Reproduction of the problem
nvm install 6.5
npm uninstall angular-cli
npm cache clean
npm install angular-cli@webpack
ng new foo
Validate that this trivial application works with RC.5. Then update package.json
to RC.6 and router to RC.2:
{
"name": "foo",
"version": "0.0.0",
"license": "MIT",
"angular-cli": {},
"scripts": {
"start": "ng serve",
"lint": "tslint \"src/**/*.ts\"",
"test": "ng test",
"pree2e": "webdriver-manager update",
"e2e": "protractor"
},
"private": true,
"dependencies": {
"@angular/common": "2.0.0-rc.6",
"@angular/compiler": "2.0.0-rc.6",
"@angular/core": "2.0.0-rc.6",
"@angular/forms": "0.3.0",
"@angular/http": "2.0.0-rc.6",
"@angular/platform-browser": "2.0.0-rc.6",
"@angular/platform-browser-dynamic": "2.0.0-rc.6",
"@angular/router": "3.0.0-rc.2",
"core-js": "^2.4.0",
"rxjs": "5.0.0-beta.11",
"ts-helpers": "^1.1.1",
"zone.js": "0.6.12"
},
"devDependencies": {
"@types/jasmine": "^2.2.30",
"angular-cli": "1.0.0-beta.11-webpack.8",
"codelyzer": "~0.0.26",
"jasmine-core": "2.4.1",
"jasmine-spec-reporter": "2.5.0",
"karma": "0.13.22",
"karma-chrome-launcher": "0.2.3",
"karma-jasmine": "0.3.8",
"karma-remap-istanbul": "^0.2.1",
"protractor": "4.0.3",
"ts-node": "1.2.1",
"tslint": "3.13.0",
"typescript": "2.0.0"
}
}
Please tell us about your environment:
- Angular version: 2.0.0-rc.X
"@angular/common": "2.0.0-rc.6",
"@angular/compiler": "2.0.0-rc.6",
"@angular/core": "2.0.0-rc.6",
"@angular/forms": "0.3.0",
"@angular/http": "2.0.0-rc.6",
"@angular/platform-browser": "2.0.0-rc.6",
"@angular/platform-browser-dynamic": "2.0.0-rc.6",
"@angular/router": "3.0.0-rc.2",
"typescript": "2.0.0"
angular-cli: 1.0.0-beta.11-webpack.8
node: 6.5.0
os: linux x64
- Browser: [all | Chrome XX | Firefox XX | IE XX | Safari XX | Mobile Chrome XX | Android X.X Web Browser | iOS XX Safari | iOS XX UIWebView | iOS XX WKWebView ]
- Language: [all | TypeScript X.X | ES6/7 | ES5] TS 2.0
Issue Analytics
- State:
- Created 7 years ago
- Comments:6 (2 by maintainers)
Top Results From Across the Web
Generic type Subject<T> requires 1 type argument(s). - Angular
The Subject class has a generic type parameter in TypeScript. ... can only be created by passing an additional type parameter, like this:...
Read more >Ivy: Generic type 'ɵɵBaseDef<T>' requires 1 type argument(s ...
A compilation error occurs for base classes without @Directive() decorator that require generic type arguments themselves.
Read more >generic type array requires 1 type argument - You.com
From looking at the react-native code for FlatList, it seems the ItemT in FlatListProps<ItemT> is the type of the element in the data...
Read more >How To Use Generics in TypeScript - DigitalOcean
This generic type accepts a single type parameter, T . Inside the type declaration itself, you are checking if the type T extends...
Read more >How to: Examine and Instantiate Generic Types with Reflection
You can create a Type object that represents a constructed type by binding type arguments to the type parameters of a generic type...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Hello pkozlowski-opensource I am using angular 7 and i am getting error “Type ‘Observable’ is not generic.” in node modules
Package.json:
{ “name”: “car”, “version”: “0.0.0”, “scripts”: { “ng”: “ng”, “start”: “ng serve”, “build”: “ng build”, “test”: “ng test”, “lint”: “ng lint”, “e2e”: “ng e2e” }, “private”: true, “dependencies”: { “@angular/animations”: “~7.1.0”, “@angular/cdk”: “^7.1.1”, “@angular/common”: “~7.1.0”, “@angular/compiler”: “~7.1.0”, “@angular/core”: “~7.1.0”, “@angular/forms”: “~7.1.0”, “@angular/material”: “^7.1.1”, “@angular/platform-browser”: “~7.1.0”, “@angular/platform-browser-dynamic”: “~7.1.0”, “@angular/router”: “~7.1.0”, “core-js”: “^2.5.4”, “rxjs”: “~6.3.3”, “tslib”: “^1.9.0”, “zone.js”: “~0.8.26” }, “devDependencies”: { “@angular-devkit/build-angular”: “~0.11.0”, “@angular/cli”: “~7.1.2”, “@angular/compiler-cli”: “~7.1.0”, “@angular/language-service”: “~7.1.0”, “@types/node”: “~8.9.4”, “@types/jasmine”: “~2.8.8”, “@types/jasminewd2”: “~2.0.3”, “codelyzer”: “~4.5.0”, “jasmine-core”: “~2.99.1”, “jasmine-spec-reporter”: “~4.2.1”, “karma”: “~3.1.1”, “karma-chrome-launcher”: “~2.2.0”, “karma-coverage-istanbul-reporter”: “~2.0.1”, “karma-jasmine”: “~1.1.2”, “karma-jasmine-html-reporter”: “^0.2.2”, “protractor”: “~5.4.0”, “ts-node”: “~7.0.0”, “tslint”: “~5.11.0”, “typescript”: “~3.1.6” } }
Error: node_modules/@angular/common/http/src/client.d.ts(1380,9): error TS2315: Type ‘Observable’ is not generic. node_modules/@angular/common/http/src/client.d.ts(1397,9): error TS2315: Type ‘Observable’ is not generic. node_modules/@angular/common/http/src/client.d.ts(1414,9): error TS2315: Type ‘Observable’ is not generic. node_modules/@angular/common/http/src/client.d.ts(1431,9): error TS2315: Type ‘Observable’ is not generic. node_modules/@angular/common/http/src/client.d.ts(1448,9): error TS2315: Type ‘Observable’ is not generic. node_modules/@angular/common/http/src/client.d.ts(1465,9): error TS2315: Type ‘Observable’ is not generic. node_modules/@angular/common/http/src/client.d.ts(1482,9): error TS2315: Type ‘Observable’ is not generic. node_modules/@angular/common/http/src/client.d.ts(1499,9): error TS2315: Type ‘Observable’ is not generic. node_modules/@angular/common/http/src/client.d.ts(1516,9): error TS2315: Type ‘Observable’ is not generic. node_modules/@angular/common/http/src/client.d.ts(1533,9): error TS2315: Type ‘Observable’ is not generic. node_modules/@angular/common/http/src/client.d.ts(1550,9): error TS2315: Type ‘Observable’ is not generic. node_modules/@angular/common/http/src/client.d.ts(1567,9): error TS2315: Type ‘Observable’ is not generic. node_modules/@angular/common/http/src/client.d.ts(1584,9): error TS2315: Type ‘Observable’ is not generic. node_modules/@angular/common/http/src/client.d.ts(1601,9): error TS2315: Type ‘Observable’ is not generic. node_modules/@angular/common/http/src/client.d.ts(1618,9): error TS2315: Type ‘Observable’ is not generic. node_modules/@angular/common/http/src/client.d.ts(1635,9): error TS2315: Type ‘Observable’ is not generic. node_modules/@angular/common/http/src/client.d.ts(1652,9): error TS2315: Type ‘Observable’ is not generic. node_modules/@angular/common/http/src/client.d.ts(1669,9): error TS2315: Type ‘Observable’ is not generic. node_modules/@angular/common/http/src/client.d.ts(1686,9): error TS2315: Type ‘Observable’ is not generic. node_modules/@angular/common/http/src/client.d.ts(1703,9): error TS2315: Type ‘Observable’ is not generic. node_modules/@angular/common/http/src/client.d.ts(1720,9): error TS2315: Type ‘Observable’ is not generic. node_modules/@angular/common/http/src/client.d.ts(1737,9): error TS2315: Type ‘Observable’ is not generic. node_modules/@angular/common/http/src/client.d.ts(1754,9): error TS2315: Type ‘Observable’ is not generic. node_modules/@angular/common/http/src/client.d.ts(1771,9): error TS2315: Type ‘Observable’ is not generic. node_modules/@angular/common/http/src/client.d.ts(1788,9): error TS2315: Type ‘Observable’ is not generic. node_modules/@angular/common/http/src/client.d.ts(1805,9): error TS2315: Type ‘Observable’ is not generic. node_modules/@angular/common/http/src/client.d.ts(1822,9): error TS2315: Type ‘Observable’ is not generic. node_modules/@angular/common/http/src/client.d.ts(1839,9): error TS2315: Type ‘Observable’ is not generic. node_modules/@angular/common/http/src/client.d.ts(1856,9): error TS2315: Type ‘Observable’ is not generic. node_modules/@angular/common/http/src/client.d.ts(1873,9): error TS2315: Type ‘Observable’ is not generic. node_modules/@angular/common/http/src/client.d.ts(1890,9): error TS2315: Type ‘Observable’ is not generic. node_modules/@angular/common/http/src/client.d.ts(1907,9): error TS2315: Type ‘Observable’ is not generic. node_modules/@angular/common/http/src/client.d.ts(1924,9): error TS2315: Type ‘Observable’ is not generic. node_modules/@angular/common/http/src/client.d.ts(1941,9): error TS2315: Type ‘Observable’ is not generic. node_modules/@angular/common/http/src/client.d.ts(1958,9): error TS2315: Type ‘Observable’ is not generic. node_modules/@angular/common/http/src/client.d.ts(1975,9): error TS2315: Type ‘Observable’ is not generic. node_modules/@angular/common/http/src/client.d.ts(1988,9): error TS2315: Type ‘Observable’ is not generic. node_modules/@angular/common/http/src/client.d.ts(2005,9): error TS2315: Type ‘Observable’ is not generic. node_modules/@angular/common/http/src/client.d.ts(2022,9): error TS2315: Type ‘Observable’ is not generic. node_modules/@angular/common/http/src/client.d.ts(2039,9): error TS2315: Type ‘Observable’ is not generic. node_modules/@angular/common/http/src/client.d.ts(2056,9): error TS2315: Type ‘Observable’ is not generic. node_modules/@angular/common/http/src/client.d.ts(2073,9): error TS2315: Type ‘Observable’ is not generic. node_modules/@angular/common/http/src/client.d.ts(2090,9): error TS2315: Type ‘Observable’ is not generic. node_modules/@angular/common/http/src/client.d.ts(2107,9): error TS2315: Type ‘Observable’ is not generic. node_modules/@angular/common/http/src/interceptor.d.ts(41,58): error TS2315: Type ‘Observable’ is not generic. node_modules/@angular/common/http/src/interceptor.d.ts(52,36): error TS2315: Type ‘Observable’ is not generic. node_modules/@angular/common/http/src/interceptor.d.ts(62,58): error TS2315: Type ‘Observable’ is not generic. node_modules/@angular/common/http/src/jsonp.d.ts(42,38): error TS2315: Type ‘Observable’ is not generic. node_modules/@angular/common/http/src/jsonp.d.ts(53,58): error TS2315: Type ‘Observable’ is not generic. node_modules/@angular/common/http/src/module.d.ts(28,36): error TS2315: Type ‘Observable’ is not generic. node_modules/@angular/common/http/src/xhr.d.ts(41,36): error TS2315: Type ‘Observable’ is not generic. node_modules/@angular/common/http/src/xsrf.d.ts(48,58): error TS2315: Type ‘Observable’ is not generic. node_modules/@angular/common/src/location/location.d.ts(8,10): error TS2305: Module ‘“E:/car/types/rxjs”’ has no exported member ‘SubscriptionLike’. node_modules/@angular/common/src/pipes/async_pipe.d.ts(48,23): error TS2315: Type ‘Observable’ is not generic. node_modules/@angular/core/src/application_ref.d.ts(174,24): error TS2315: Type ‘Observable’ is not generic. node_modules/@angular/core/src/event_emitter.d.ts(62,46): error TS2315: Type ‘Subject’ is not generic. node_modules/@angular/core/src/linker/query_list.d.ts(38,23): error TS2315: Type ‘Observable’ is not generic. node_modules/@angular/core/src/util/lang.d.ts(16,49): error TS2315: Type ‘Observable’ is not generic. node_modules/@angular/core/src/util/lang.d.ts(16,74): error TS2315: Type ‘Observable’ is not generic. node_modules/@angular/forms/src/directives/abstract_control_directive.d.ts(106,29): error TS2315: Type ‘Observable’ is not generic. node_modules/@angular/forms/src/directives/abstract_control_directive.d.ts(113,28): error TS2315: Type ‘Observable’ is not generic. node_modules/@angular/forms/src/directives/validators.d.ts(102,76): error TS2315: Type ‘Observable’ is not generic. node_modules/@angular/forms/src/directives/validators.d.ts(184,68): error TS2315: Type ‘Observable’ is not generic. node_modules/@angular/forms/src/model.d.ts(200,28): error TS2315: Type ‘Observable’ is not generic. node_modules/@angular/forms/src/model.d.ts(205,29): error TS2315: Type ‘Observable’ is not generic. node_modules/@angular/forms/src/validators.d.ts(255,47): error TS2315: Type ‘Observable’ is not generic. node_modules/@angular/router/src/config.d.ts(330,106): error TS2315: Type ‘Observable’ is not generic. node_modules/@angular/router/src/interfaces.d.ts(82,77): error TS2315: Type ‘Observable’ is not generic. node_modules/@angular/router/src/interfaces.d.ts(84,100): error TS2315: Type ‘Observable’ is not generic. node_modules/@angular/router/src/interfaces.d.ts(165,87): error TS2315: Type ‘Observable’ is not generic. node_modules/@angular/router/src/interfaces.d.ts(167,110): error TS2315: Type ‘Observable’ is not generic. node_modules/@angular/router/src/interfaces.d.ts(241,140): error TS2315: Type ‘Observable’ is not generic. node_modules/@angular/router/src/interfaces.d.ts(243,166): error TS2315: Type ‘Observable’ is not generic. node_modules/@angular/router/src/interfaces.d.ts(313,73): error TS2315: Type ‘Observable’ is not generic. node_modules/@angular/router/src/interfaces.d.ts(380,52): error TS2315: Type ‘Observable’ is not generic. node_modules/@angular/router/src/interfaces.d.ts(382,75): error TS2315: Type ‘Observable’ is not generic. node_modules/@angular/router/src/router.d.ts(190,22): error TS2315: Type ‘Observable’ is not generic. node_modules/@angular/router/src/router_config_loader.d.ts(22,51): error TS2315: Type ‘Observable’ is not generic.node_modules/@angular/router/src/router_preloader.d.ts(20,46): error TS2315: Type ‘Observable’ is not generic. node_modules/@angular/router/src/router_preloader.d.ts(20,64): error TS2315: Type ‘Observable’ is not generic. node_modules/@angular/router/src/router_preloader.d.ts(34,37): error TS2315: Type ‘Observable’ is not generic. node_modules/@angular/router/src/router_preloader.d.ts(34,55): error TS2315: Type ‘Observable’ is not generic. node_modules/@angular/router/src/router_preloader.d.ts(46,37): error TS2315: Type ‘Observable’ is not generic. node_modules/@angular/router/src/router_preloader.d.ts(46,55): error TS2315: Type ‘Observable’ is not generic. node_modules/@angular/router/src/router_preloader.d.ts(68,16): error TS2315: Type ‘Observable’ is not generic. node_modules/@angular/router/src/router_state.d.ts(71,10): error TS2315: Type ‘Observable’ is not generic. node_modules/@angular/router/src/router_state.d.ts(73,13): error TS2315: Type ‘Observable’ is not generic. node_modules/@angular/router/src/router_state.d.ts(75,18): error TS2315: Type ‘Observable’ is not generic. node_modules/@angular/router/src/router_state.d.ts(77,15): error TS2315: Type ‘Observable’ is not generic. node_modules/@angular/router/src/router_state.d.ts(79,11): error TS2315: Type ‘Observable’ is not generic. node_modules/@angular/router/src/router_state.d.ts(98,24): error TS2315: Type ‘Observable’ is not generic. node_modules/@angular/router/src/router_state.d.ts(99,29): error TS2315: Type ‘Observable’ is not generic. node_modules/@angular/router/src/utils/collection.d.ts(33,29): error TS2315: Type ‘Observable’ is not generic. node_modules/@angular/router/src/utils/collection.d.ts(33,45): error TS2315: Type ‘Observable’ is not generic. node_modules/@angular/router/src/utils/collection.d.ts(36,92): error TS2315: Type ‘Observable’ is not generic. node_modules/@angular/router/src/utils/collection.d.ts(36,108): error TS2315: Type ‘Observable’ is not generic.
Can you please let me know if am using the correct @angular/material or correct @angular/cdk
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.