Hello,
I have a problem with the last version angular/core.
After updating I've got this list of warnings
WARNING in ./node_modules/@angular/cdk/esm5/a11y.es5.js
1118:164-170 "export 'inject' was not found in '@angular/core'
WARNING in ./node_modules/@angular/cdk/esm5/a11y.es5.js
1118:62-78 "export 'defineInjectable' was not found in '@angular/core'
WARNING in ./node_modules/@angular/cdk/esm5/a11y.es5.js
1660:152-158 "export 'inject' was not found in '@angular/core'
WARNING in ./node_modules/@angular/cdk/esm5/a11y.es5.js
1660:182-188 "export 'inject' was not found in '@angular/core'
WARNING in ./node_modules/@angular/cdk/esm5/a11y.es5.js
1660:198-204 "export 'inject' was not found in '@angular/core'
WARNING in ./node_modules/@angular/cdk/esm5/a11y.es5.js
1660:58-74 "export 'defineInjectable' was not found in '@angular/core'
WARNING in ./node_modules/@angular/cdk/esm5/a11y.es5.js
1845:143-149 "export 'inject' was not found in '@angular/core'
WARNING in ./node_modules/@angular/cdk/esm5/a11y.es5.js
1845:190-196 "export 'inject' was not found in '@angular/core'
WARNING in ./node_modules/@angular/cdk/esm5/a11y.es5.js
1845:55-71 "export 'defineInjectable' was not found in '@angular/core'
WARNING in ./node_modules/@angular/cdk/esm5/a11y.es5.js
2274:140-146 "export 'inject' was not found in '@angular/core'
WARNING in ./node_modules/@angular/cdk/esm5/a11y.es5.js
2274:156-162 "export 'inject' was not found in '@angular/core'
WARNING in ./node_modules/@angular/cdk/esm5/a11y.es5.js
2274:54-70 "export 'defineInjectable' was not found in '@angular/core'
WARNING in ./node_modules/@angular/cdk/esm5/scrolling.es5.js
270:152-158 "export 'inject' was not found in '@angular/core'
WARNING in ./node_modules/@angular/cdk/esm5/scrolling.es5.js
270:168-174 "export 'inject' was not found in '@angular/core'
WARNING in ./node_modules/@angular/cdk/esm5/scrolling.es5.js
270:58-74 "export 'defineInjectable' was not found in '@angular/core'
WARNING in ./node_modules/@angular/cdk/esm5/overlay.es5.js
3175:170-176 "export 'inject' was not found in '@angular/core'
WARNING in ./node_modules/@angular/cdk/esm5/overlay.es5.js
3175:193-199 "export 'inject' was not found in '@angular/core'
WARNING in ./node_modules/@angular/cdk/esm5/overlay.es5.js
3175:64-80 "export 'defineInjectable' was not found in '@angular/core'
WARNING in ./node_modules/@angular/cdk/esm5/bidi.es5.js
32:34-40 "export 'inject' was not found in '@angular/core'
WARNING in ./node_modules/@angular/cdk/esm5/overlay.es5.js
3354:48-54 "export 'inject' was not found in '@angular/core'
WARNING in ./node_modules/@angular/cdk/esm5/overlay.es5.js
3355:45-51 "export 'inject' was not found in '@angular/core'
WARNING in ./node_modules/@angular/cdk/esm5/overlay.es5.js
3356:38-44 "export 'inject' was not found in '@angular/core'
WARNING in ./node_modules/@angular/cdk/esm5/a11y.es5.js
359:143-149 "export 'inject' was not found in '@angular/core'
WARNING in ./node_modules/@angular/cdk/esm5/a11y.es5.js
359:55-71 "export 'defineInjectable' was not found in '@angular/core'
WARNING in ./node_modules/@angular/cdk/esm5/observers.es5.js
40:65-81 "export 'defineInjectable' was not found in '@angular/core'
WARNING in ./node_modules/@angular/cdk/esm5/collections.es5.js
411:67-83 "export 'defineInjectable' was not found in '@angular/core'
WARNING in ./node_modules/@angular/cdk/esm5/scrolling.es5.js
520:143-149 "export 'inject' was not found in '@angular/core'
WARNING in ./node_modules/@angular/cdk/esm5/scrolling.es5.js
520:161-167 "export 'inject' was not found in '@angular/core'
WARNING in ./node_modules/@angular/cdk/esm5/scrolling.es5.js
520:55-71 "export 'defineInjectable' was not found in '@angular/core'
WARNING in ./node_modules/@angular/cdk/esm5/overlay.es5.js
605:167-173 "export 'inject' was not found in '@angular/core'
WARNING in ./node_modules/@angular/cdk/esm5/overlay.es5.js
605:193-199 "export 'inject' was not found in '@angular/core'
WARNING in ./node_modules/@angular/cdk/esm5/overlay.es5.js
605:216-222 "export 'inject' was not found in '@angular/core'
WARNING in ./node_modules/@angular/cdk/esm5/overlay.es5.js
605:232-238 "export 'inject' was not found in '@angular/core'
WARNING in ./node_modules/@angular/cdk/esm5/overlay.es5.js
605:63-79 "export 'defineInjectable' was not found in '@angular/core'
WARNING in ./node_modules/@angular/cdk/esm5/platform.es5.js
68:50-66 "export 'defineInjectable' was not found in '@angular/core'
WARNING in ./node_modules/@angular/cdk/esm5/bidi.es5.js
70:146-152 "export 'inject' was not found in '@angular/core'
WARNING in ./node_modules/@angular/cdk/esm5/bidi.es5.js
70:56-72 "export 'defineInjectable' was not found in '@angular/core'
WARNING in ./node_modules/@angular/cdk/esm5/overlay.es5.js
731:179-185 "export 'inject' was not found in '@angular/core'
WARNING in ./node_modules/@angular/cdk/esm5/overlay.es5.js
731:67-83 "export 'defineInjectable' was not found in '@angular/core'
WARNING in ./node_modules/@angular/cdk/esm5/overlay.es5.js
833:152-158 "export 'inject' was not found in '@angular/core'
WARNING in ./node_modules/@angular/cdk/esm5/overlay.es5.js
833:58-74 "export 'defineInjectable' was not found in '@angular/core'
and after that error in the console
Uncaught TypeError: Object(...) is not a function
at main.dbf9396177fc4f9f28b0.bundle.js:1
at Object.x35b (main.dbf9396177fc4f9f28b0.bundle.js:1)
at t (inline.318b50c57b4eba3d437b.bundle.js:1)
at Object.0 (main.dbf9396177fc4f9f28b0.bundle.js:1)
at t (inline.318b50c57b4eba3d437b.bundle.js:1)
at window.webpackJsonp (inline.318b50c57b4eba3d437b.bundle.js:1)
at main.dbf9396177fc4f9f28b0.bundle.js:1
Monday 19.03 all was fine.
Same issue
ng serve --hmr -e=hmr --sourcemaps --proxy-config proxy.config.json --host localhost
NOTICE Hot Module Replacement (HMR) is enabled for the dev server.
* NG Live Development Server is listening on localhost:4200, open your browser on http://localhost:4200/ *
10% building modules 3/3 modules 0 active[HPM] Proxy created: /api -> http://localhost:9000/cms
[HPM] Subscribed to http-proxy events: [ 'error', 'close' ]
Date: 2018-03-21T12:54:13.778Z
Hash: 6496468f0573d28311b7
Time: 20485ms
chunk {Boot} Boot.chunk.js () 44.5 kB [rendered]
chunk {Boot.0} Boot.0.chunk.js () 16.5 kB [rendered]
chunk {inline} inline.bundle.js (inline) 31.1 kB [entry] [rendered]
chunk {main} main.bundle.js (main) 774 kB [initial] [rendered]
chunk {polyfills} polyfills.bundle.js (polyfills) 3.88 MB [initial] [rendered]
chunk {scripts} scripts.bundle.js (scripts) 325 kB [initial] [rendered]
chunk {styles} styles.bundle.js (styles) 406 kB [initial] [rendered]
chunk {vendor} vendor.bundle.js (vendor) 26.1 MB [initial] [rendered]
WARNING in ./node_modules/@angular/cdk/esm5/a11y.es5.js
1118:164-170 "export 'inject' was not found in '@angular/core'
WARNING in ./node_modules/@angular/cdk/esm5/a11y.es5.js
1118:62-78 "export 'defineInjectable' was not found in '@angular/core'
WARNING in ./node_modules/@angular/cdk/esm5/a11y.es5.js
1660:152-158 "export 'inject' was not found in '@angular/core'
WARNING in ./node_modules/@angular/cdk/esm5/a11y.es5.js
1660:182-188 "export 'inject' was not found in '@angular/core'
WARNING in ./node_modules/@angular/cdk/esm5/a11y.es5.js
1660:198-204 "export 'inject' was not found in '@angular/core'
WARNING in ./node_modules/@angular/cdk/esm5/a11y.es5.js
1660:58-74 "export 'defineInjectable' was not found in '@angular/core'
WARNING in ./node_modules/@angular/cdk/esm5/a11y.es5.js
1845:143-149 "export 'inject' was not found in '@angular/core'
WARNING in ./node_modules/@angular/cdk/esm5/a11y.es5.js
1845:190-196 "export 'inject' was not found in '@angular/core'
WARNING in ./node_modules/@angular/cdk/esm5/a11y.es5.js
1845:55-71 "export 'defineInjectable' was not found in '@angular/core'
WARNING in ./node_modules/@angular/cdk/esm5/a11y.es5.js
2274:140-146 "export 'inject' was not found in '@angular/core'
WARNING in ./node_modules/@angular/cdk/esm5/a11y.es5.js
2274:156-162 "export 'inject' was not found in '@angular/core'
WARNING in ./node_modules/@angular/cdk/esm5/a11y.es5.js
2274:54-70 "export 'defineInjectable' was not found in '@angular/core'
WARNING in ./node_modules/@angular/cdk/esm5/scrolling.es5.js
270:152-158 "export 'inject' was not found in '@angular/core'
WARNING in ./node_modules/@angular/cdk/esm5/scrolling.es5.js
270:168-174 "export 'inject' was not found in '@angular/core'
WARNING in ./node_modules/@angular/cdk/esm5/scrolling.es5.js
270:58-74 "export 'defineInjectable' was not found in '@angular/core'
WARNING in ./node_modules/@angular/cdk/esm5/overlay.es5.js
3175:170-176 "export 'inject' was not found in '@angular/core'
WARNING in ./node_modules/@angular/cdk/esm5/overlay.es5.js
3175:193-199 "export 'inject' was not found in '@angular/core'
WARNING in ./node_modules/@angular/cdk/esm5/overlay.es5.js
3175:64-80 "export 'defineInjectable' was not found in '@angular/core'
WARNING in ./node_modules/@angular/cdk/esm5/bidi.es5.js
32:34-40 "export 'inject' was not found in '@angular/core'
WARNING in ./node_modules/@angular/cdk/esm5/overlay.es5.js
3354:48-54 "export 'inject' was not found in '@angular/core'
WARNING in ./node_modules/@angular/cdk/esm5/overlay.es5.js
3355:45-51 "export 'inject' was not found in '@angular/core'
WARNING in ./node_modules/@angular/cdk/esm5/overlay.es5.js
3356:38-44 "export 'inject' was not found in '@angular/core'
WARNING in ./node_modules/@angular/cdk/esm5/a11y.es5.js
359:143-149 "export 'inject' was not found in '@angular/core'
WARNING in ./node_modules/@angular/cdk/esm5/a11y.es5.js
359:55-71 "export 'defineInjectable' was not found in '@angular/core'
WARNING in ./node_modules/@angular/cdk/esm5/observers.es5.js
40:65-81 "export 'defineInjectable' was not found in '@angular/core'
WARNING in ./node_modules/@angular/cdk/esm5/collections.es5.js
411:67-83 "export 'defineInjectable' was not found in '@angular/core'
WARNING in ./node_modules/@angular/cdk/esm5/scrolling.es5.js
520:143-149 "export 'inject' was not found in '@angular/core'
WARNING in ./node_modules/@angular/cdk/esm5/scrolling.es5.js
520:161-167 "export 'inject' was not found in '@angular/core'
WARNING in ./node_modules/@angular/cdk/esm5/scrolling.es5.js
520:55-71 "export 'defineInjectable' was not found in '@angular/core'
WARNING in ./node_modules/@angular/cdk/esm5/overlay.es5.js
605:167-173 "export 'inject' was not found in '@angular/core'
WARNING in ./node_modules/@angular/cdk/esm5/overlay.es5.js
605:193-199 "export 'inject' was not found in '@angular/core'
WARNING in ./node_modules/@angular/cdk/esm5/overlay.es5.js
605:216-222 "export 'inject' was not found in '@angular/core'
WARNING in ./node_modules/@angular/cdk/esm5/overlay.es5.js
605:232-238 "export 'inject' was not found in '@angular/core'
WARNING in ./node_modules/@angular/cdk/esm5/overlay.es5.js
605:63-79 "export 'defineInjectable' was not found in '@angular/core'
WARNING in ./node_modules/@angular/cdk/esm5/platform.es5.js
68:50-66 "export 'defineInjectable' was not found in '@angular/core'
WARNING in ./node_modules/@angular/cdk/esm5/bidi.es5.js
70:146-152 "export 'inject' was not found in '@angular/core'
WARNING in ./node_modules/@angular/cdk/esm5/bidi.es5.js
70:56-72 "export 'defineInjectable' was not found in '@angular/core'
WARNING in ./node_modules/@angular/cdk/esm5/overlay.es5.js
731:179-185 "export 'inject' was not found in '@angular/core'
WARNING in ./node_modules/@angular/cdk/esm5/overlay.es5.js
731:67-83 "export 'defineInjectable' was not found in '@angular/core'
WARNING in ./node_modules/@angular/cdk/esm5/overlay.es5.js
833:152-158 "export 'inject' was not found in '@angular/core'
WARNING in ./node_modules/@angular/cdk/esm5/overlay.es5.js
833:58-74 "export 'defineInjectable' was not found in '@angular/core'
webpack: Compiled with warnings.
I've changed a version of angular/core and angular/material back to 5.2.8 and now is working.
Some here
same here
I explicity set the material and cdk build that I want npm install use,
AND IT WORKS.
on package.json, set:
"@angular/cdk": "github:angular/cdk-builds#89f40f293288fc8e568cc01c7b79d31e25c61de0",
and
"@angular/material": "github:angular/material2-builds#8873f67f2988f214d09b55b15f2e10a5d9b5bb0d",
this builds are the used by my app before I update yesterday.
I hope it will work for you @Metiner, @briancvn and @preslyel !
@steinjonathan It worked for me. Thanks!
@steinjonathan Yes, it works, Thanks
You can also revert it to the previous version (5.2.4) for both @angular/material and @angular/cdk.
{
"name": "dash-test",
"version": "0.0.0",
"license": "MIT",
"scripts": {
"ng": "ng",
"start": "ng serve",
"build": "ng build --prod",
"test": "ng test",
"lint": "ng lint",
"e2e": "ng e2e"
},
"private": true,
"dependencies": {
"@angular/animations": "^5.2.0",
"@angular/common": "^5.2.0",
"@angular/compiler": "^5.2.0",
"@angular/core": "^5.2.0",
"@angular/forms": "^5.2.0",
"@angular/http": "^5.2.0",
"@angular/platform-browser": "^5.2.0",
"@angular/platform-browser-dynamic": "^5.2.0",
"@angular/router": "^5.2.0",
"core-js": "^2.4.1",
"rxjs": "^5.5.6",
"zone.js": "^0.8.19"
},
"devDependencies": {
"@angular/cli": "~1.7.3",
"@angular/compiler-cli": "^5.2.0",
"@angular/language-service": "^5.2.0",
"@types/jasmine": "~2.8.3",
"@types/jasminewd2": "~2.0.2",
"@types/node": "~6.0.60",
"codelyzer": "^4.0.1",
"jasmine-core": "~2.8.0",
"jasmine-spec-reporter": "~4.2.1",
"karma": "~2.0.0",
"karma-chrome-launcher": "~2.2.0",
"karma-coverage-istanbul-reporter": "^1.2.1",
"karma-jasmine": "~1.1.0",
"karma-jasmine-html-reporter": "^0.2.2",
"protractor": "~5.1.2",
"ts-node": "~4.1.0",
"tslint": "~5.9.1",
"typescript": "~2.5.3"
}
}
i am getting the below errror for this package
WARNING in ./node_modules/@angular/material/esm5/datepicker.es5.js
103:59-75 "export 'defineInjectable' was not found in '@angular/core'
WARNING in ./node_modules/@angular/cdk/esm5/a11y.es5.js
1112:164-170 "export 'inject' was not found in '@angular/core'
WARNING in ./node_modules/@angular/cdk/esm5/a11y.es5.js
1112:62-78 "export 'defineInjectable' was not found in '@angular/core'
WARNING in ./node_modules/@angular/cdk/esm5/text-field.es5.js
120:149-155 "export 'inject' was not found in '@angular/core'
WARNING in ./node_modules/@angular/cdk/esm5/text-field.es5.js
120:167-173 "export 'inject' was not found in '@angular/core'
WARNING in ./node_modules/@angular/cdk/esm5/text-field.es5.js
120:57-73 "export 'defineInjectable' was not found in '@angular/core'
WARNING in ./node_modules/@angular/material/esm5/core.es5.js
1327:59-75 "export 'defineInjectable' was not found in '@angular/core'
WARNING in ./node_modules/@angular/cdk/esm5/a11y.es5.js
1659:152-158 "export 'inject' was not found in '@angular/core'
WARNING in ./node_modules/@angular/cdk/esm5/a11y.es5.js
1659:182-188 "export 'inject' was not found in '@angular/core'
WARNING in ./node_modules/@angular/cdk/esm5/a11y.es5.js
1659:198-204 "export 'inject' was not found in '@angular/core'
WARNING in ./node_modules/@angular/cdk/esm5/a11y.es5.js
1659:58-74 "export 'defineInjectable' was not found in '@angular/core'
WARNING in ./node_modules/@angular/cdk/esm5/a11y.es5.js
1844:143-149 "export 'inject' was not found in '@angular/core'
WARNING in ./node_modules/@angular/cdk/esm5/a11y.es5.js
1844:190-196 "export 'inject' was not found in '@angular/core'
WARNING in ./node_modules/@angular/cdk/esm5/a11y.es5.js
1844:55-71 "export 'defineInjectable' was not found in '@angular/core'
WARNING in ./node_modules/@angular/material/esm5/datepicker.es5.js
1855:39-45 "export 'inject' was not found in '@angular/core'
WARNING in ./node_modules/@angular/cdk/esm5/a11y.es5.js
2273:140-146 "export 'inject' was not found in '@angular/core'
WARNING in ./node_modules/@angular/cdk/esm5/a11y.es5.js
2273:156-162 "export 'inject' was not found in '@angular/core'
WARNING in ./node_modules/@angular/cdk/esm5/a11y.es5.js
2273:54-70 "export 'defineInjectable' was not found in '@angular/core'
WARNING in ./node_modules/@angular/cdk/esm5/layout.es5.js
253:158-164 "export 'inject' was not found in '@angular/core'
WARNING in ./node_modules/@angular/cdk/esm5/layout.es5.js
253:180-186 "export 'inject' was not found in '@angular/core'
WARNING in ./node_modules/@angular/cdk/esm5/layout.es5.js
253:60-76 "export 'defineInjectable' was not found in '@angular/core'
WARNING in ./node_modules/@angular/cdk/esm5/scrolling.es5.js
265:152-158 "export 'inject' was not found in '@angular/core'
WARNING in ./node_modules/@angular/cdk/esm5/scrolling.es5.js
265:168-174 "export 'inject' was not found in '@angular/core'
WARNING in ./node_modules/@angular/cdk/esm5/scrolling.es5.js
265:58-74 "export 'defineInjectable' was not found in '@angular/core'
WARNING in ./node_modules/@angular/material/esm5/autocomplete.es5.js
272:39-45 "export 'inject' was not found in '@angular/core'
WARNING in ./node_modules/@angular/material/esm5/sort.es5.js
300:59-75 "export 'defineInjectable' was not found in '@angular/core'
WARNING in ./node_modules/@angular/cdk/esm5/overlay.es5.js
3234:170-176 "export 'inject' was not found in '@angular/core'
WARNING in ./node_modules/@angular/cdk/esm5/overlay.es5.js
3234:193-199 "export 'inject' was not found in '@angular/core'
WARNING in ./node_modules/@angular/cdk/esm5/overlay.es5.js
3234:64-80 "export 'defineInjectable' was not found in '@angular/core'
WARNING in ./node_modules/@angular/cdk/esm5/bidi.es5.js
32:34-40 "export 'inject' was not found in '@angular/core'
WARNING in ./node_modules/@angular/cdk/esm5/overlay.es5.js
3413:48-54 "export 'inject' was not found in '@angular/core'
WARNING in ./node_modules/@angular/cdk/esm5/overlay.es5.js
3414:45-51 "export 'inject' was not found in '@angular/core'
WARNING in ./node_modules/@angular/cdk/esm5/overlay.es5.js
3415:38-44 "export 'inject' was not found in '@angular/core'
WARNING in ./node_modules/@angular/cdk/esm5/a11y.es5.js
353:143-149 "export 'inject' was not found in '@angular/core'
WARNING in ./node_modules/@angular/cdk/esm5/a11y.es5.js
353:55-71 "export 'defineInjectable' was not found in '@angular/core'
WARNING in ./node_modules/@angular/cdk/esm5/observers.es5.js
40:65-81 "export 'defineInjectable' was not found in '@angular/core'
WARNING in ./node_modules/@angular/cdk/esm5/collections.es5.js
411:67-83 "export 'defineInjectable' was not found in '@angular/core'
WARNING in ./node_modules/@angular/material/esm5/core.es5.js
510:34-40 "export 'inject' was not found in '@angular/core'
WARNING in ./node_modules/@angular/cdk/esm5/scrolling.es5.js
515:143-149 "export 'inject' was not found in '@angular/core'
WARNING in ./node_modules/@angular/cdk/esm5/scrolling.es5.js
515:161-167 "export 'inject' was not found in '@angular/core'
WARNING in ./node_modules/@angular/cdk/esm5/scrolling.es5.js
515:55-71 "export 'defineInjectable' was not found in '@angular/core'
WARNING in ./node_modules/@angular/material/esm5/dialog.es5.js
601:39-45 "export 'inject' was not found in '@angular/core'
WARNING in ./node_modules/@angular/cdk/esm5/overlay.es5.js
604:167-173 "export 'inject' was not found in '@angular/core'
WARNING in ./node_modules/@angular/cdk/esm5/overlay.es5.js
604:193-199 "export 'inject' was not found in '@angular/core'
WARNING in ./node_modules/@angular/cdk/esm5/overlay.es5.js
604:216-222 "export 'inject' was not found in '@angular/core'
WARNING in ./node_modules/@angular/cdk/esm5/overlay.es5.js
604:232-238 "export 'inject' was not found in '@angular/core'
WARNING in ./node_modules/@angular/cdk/esm5/overlay.es5.js
604:63-79 "export 'defineInjectable' was not found in '@angular/core'
WARNING in ./node_modules/@angular/material/esm5/icon.es5.js
677:149-155 "export 'inject' was not found in '@angular/core'
WARNING in ./node_modules/@angular/material/esm5/icon.es5.js
677:178-184 "export 'inject' was not found in '@angular/core'
WARNING in ./node_modules/@angular/material/esm5/icon.es5.js
677:200-206 "export 'inject' was not found in '@angular/core'
WARNING in ./node_modules/@angular/material/esm5/icon.es5.js
677:57-73 "export 'defineInjectable' was not found in '@angular/core'
WARNING in ./node_modules/@angular/material/esm5/tooltip.es5.js
67:39-45 "export 'inject' was not found in '@angular/core'
WARNING in ./node_modules/@angular/material/esm5/stepper.es5.js
67:56-72 "export 'defineInjectable' was not found in '@angular/core'
WARNING in ./node_modules/@angular/cdk/esm5/platform.es5.js
68:50-66 "export 'defineInjectable' was not found in '@angular/core'
WARNING in ./node_modules/@angular/cdk/esm5/bidi.es5.js
70:146-152 "export 'inject' was not found in '@angular/core'
WARNING in ./node_modules/@angular/cdk/esm5/bidi.es5.js
70:56-72 "export 'defineInjectable' was not found in '@angular/core'
WARNING in ./node_modules/@angular/material/esm5/paginator.es5.js
72:58-74 "export 'defineInjectable' was not found in '@angular/core'
WARNING in ./node_modules/@angular/cdk/esm5/overlay.es5.js
730:179-185 "export 'inject' was not found in '@angular/core'
WARNING in ./node_modules/@angular/cdk/esm5/overlay.es5.js
730:67-83 "export 'defineInjectable' was not found in '@angular/core'
WARNING in ./node_modules/@angular/cdk/esm5/overlay.es5.js
832:152-158 "export 'inject' was not found in '@angular/core'
WARNING in ./node_modules/@angular/cdk/esm5/overlay.es5.js
832:58-74 "export 'defineInjectable' was not found in '@angular/core'
WARNING in ./node_modules/@angular/material/esm5/menu.es5.js
834:39-45 "export 'inject' was not found in '@angular/core'
WARNING in ./node_modules/@angular/cdk/esm5/layout.es5.js
84:140-146 "export 'inject' was not found in '@angular/core'
WARNING in ./node_modules/@angular/cdk/esm5/layout.es5.js
84:54-70 "export 'defineInjectable' was not found in '@angular/core'
I reverted to 5.2.3 and that did the trick!
npm i @angular/[email protected] @angular/[email protected] to revert back to the latest 5 version for angular material and angular cdk, and it will work
Thanks @Aimopotis its work for me.
I don't have either the /material nor /cdk and I'm still getting the warning with /core version 5.2.3.
Would anyone happen to know which other version I should change ?
{
"dependencies": {
"@angular/core": "5.2.3",
"@angular/animations": "^5.0.0",
"@angular/common": "^5.0.0",
"@angular/compiler": "^5.0.0",
"@angular/forms": "^5.0.0",
"@angular/http": "^5.0.0",
"@angular/platform-browser": "^5.0.0",
"@angular/platform-browser-dynamic": "^5.0.0",
"@angular/router": "^5.0.0",
"@ng-bootstrap/ng-bootstrap": "^1.0.0",
"@ngx-translate/core": "^9.1.1",
"@ngx-translate/http-loader": "^2.0.1",
"bootstrap": "^4.0.0",
"chart.js": "^2.7.2",
"core-js": "^2.4.1",
"font-awesome": "^4.7.0",
"ngx-bootstrap": "^2.0.3",
"ngx-chips": "^1.6.3-rc.3",
"ngx-cookie-service": "^1.0.10",
"ngx-quill": "^2.1.2",
"quill": "^1.3.6",
"rxjs": "^5.5.2",
"zone.js": "^0.8.14"
},
"devDependencies": {
"@angular/cli": "^1.7.0",
"@angular/compiler-cli": "^5.0.0",
"@angular/language-service": "^5.0.0",
"@types/jasmine": "~2.5.53",
"@types/jasminewd2": "~2.0.2",
"@types/node": "~6.0.60",
"codelyzer": "^4.0.1",
"dyson": "^2.0.0",
"jasmine-core": "~2.6.2",
"jasmine-spec-reporter": "~4.1.0",
"karma": "~1.7.0",
"karma-chrome-launcher": "~2.1.1",
"karma-cli": "~1.0.1",
"karma-coverage-istanbul-reporter": "^1.2.1",
"karma-jasmine": "~1.1.0",
"karma-jasmine-html-reporter": "^0.2.2",
"pre-push": "^0.1.1",
"protractor": "~5.1.2",
"sass-lint": "^1.12.1",
"ts-node": "~3.2.0",
"tslint": "~5.7.0",
"typescript": "~2.4.2"
}
}
{
"name": "my",
"version": "0.0.0",
"license": "MIT",
"scripts": {
"ng": "ng",
"start": "ng serve",
"build": "ng build --prod",
"test": "ng test",
"lint": "ng lint",
"e2e": "ng e2e"
},
"private": true,
"dependencies": {
"@angular/animations": "^5.2.11",
"@angular/cdk": "^5.2.0",
"@angular/common": "^5.2.0",
"@angular/compiler": "^5.2.0",
"@angular/core": "^5.2.0",
"@angular/forms": "^5.2.0",
"@angular/http": "^5.2.0",
"@angular/material": "^5.2.0",
"@angular/platform-browser": "^5.2.0",
"@angular/platform-browser-dynamic": "^5.2.0",
"@angular/router": "^5.2.0",
"angular-material": "^1.1.10",
"bootstrap": "^4.1.3",
"core-js": "^2.4.1",
"font-awesome": "^4.7.0",
"hammerjs": "^2.0.8",
"jquery": "^3.3.1",
"rxjs": "^5.5.6",
"zone.js": "^0.8.19"
},
"devDependencies": {
"@angular/cli": "~1.7.4",
"@angular/compiler-cli": "^5.2.0",
"@angular/language-service": "^5.2.0",
"@types/jasmine": "~2.8.3",
"@types/jasminewd2": "~2.0.2",
"@types/node": "~6.0.60",
"codelyzer": "^4.0.1",
"jasmine-core": "~2.8.0",
"jasmine-spec-reporter": "~4.2.1",
"karma": "~2.0.0",
"karma-chrome-launcher": "~2.2.0",
"karma-coverage-istanbul-reporter": "^1.2.1",
"karma-jasmine": "~1.1.0",
"karma-jasmine-html-reporter": "^0.2.2",
"protractor": "~5.1.2",
"ts-node": "~4.1.0",
"tslint": "~5.9.1",
"typescript": "~2.5.3"
}
}
WARNING in ./node_modules/@angular/cdk/esm5/bidi.es5.js
39:11-17 "export 'inject' was not found in '@angular/core'
WARNING in ./node_modules/@angular/cdk/esm5/platform.es5.js
79:128-134 "export 'inject' was not found in '@angular/core'
WARNING in ./node_modules/@angular/cdk/esm5/platform.es5.js
79:50-66 "export 'defineInjectable' was not found in '@angular/core'
WARNING in ./node_modules/@angular/cdk/esm5/bidi.es5.js
86:146-152 "export 'inject' was not found in '@angular/core'
WARNING in ./node_modules/@angular/cdk/esm5/bidi.es5.js
86:56-72 "export 'defineInjectable' was not found in '@angular/core'
I just forgot to import the BrowserAnimationModule:
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
Same issue here. I am not using material or cdk.
Well I found that defineInjectable
is only present in @angular/core
from 6.x.x
version. My project uses Angular 5.2.11
and thus can not use defineInjectable
.
The culprit was a library that my Angular app uses which has been updated to (for Angular 6 I guess)... So reverting its version to a previous one (in my app's package.json
) seems to fix the issue.
Make sure "@angular/cdk" and "@angular/core" have same version or nearby version
(e.g) "@angular/cdk": "^7.3.6", "@angular/core": "^7.2.11"
Developers for Angular released Angular v8.0.0 in April 2019. With my newest project, I updated Angular CLI to the most recent version, and the documentation for Angular Material setup was compatible with it. If you're using an older version of Angular, you probably have to install the older versions of Material as well.
Just update angular cli and angular material & Cdk. It will work.
For me having all of them to the same version worked fine ! e.g. angular-cli, angular material and angular cdk .. all on 7.3.6
I've changed a version of angular/cdk and angular/material back to 7.3.7 or any other stable version and now is working
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
I explicity set the material and cdk build that I want npm install use,
AND IT WORKS.
on package.json, set:
"@angular/cdk": "github:angular/cdk-builds#89f40f293288fc8e568cc01c7b79d31e25c61de0",
and
"@angular/material": "github:angular/material2-builds#8873f67f2988f214d09b55b15f2e10a5d9b5bb0d",
this builds are the used by my app before I update yesterday.
I hope it will work for you @Metiner, @briancvn and @preslyel !