question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

"export 'inject' was not found

See original GitHub issue

Hello, I have a problem with the last version angular/material. 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.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:12
  • Comments:16 (3 by maintainers)

github_iconTop GitHub Comments

19reactions
mibrito707commented, Mar 23, 2018

@julianobrasil Thanks to your comment I realized the main issue (using the latest material’s build). But even if your answer is more than valid, allow me to recommend to @preslyel not to upgrade angular core and/or typescript (since this can bring other problems) Instead, try to get lates estable release (v5.2.4) and reinstall the packages again. To get the latest stable version just change the package.json file from: “@angular/cdk”: “github:angular/cdk-builds” “@angular/material”: “github:angular/material2-builds” to this: “@angular/cdk”: “^5.2.4” “@angular/material”: “^5.2.4”

and run npm install or yarn install

Hope this helps.

2reactions
julianobrasilcommented, Mar 22, 2018

Try to upgrade typescript: "typescript": "2.7.2" and, after that, angular itself (which seems to be the problem as you’re installing the latest builds of material). You’ll need angular 6.0.0 beta.

Read more comments on GitHub >

github_iconTop Results From Across the Web

vue.js - "export 'default' (imported as 'Vue') was not found in 'vue'
The reason this is happening is because in Vue 2, Vue provides a default export export default vue , which allows BootstrapVue to...
Read more >
NG0301: Export not found! - Angular
Use the export name to trace the templates or modules using this export. Ensure that all dependencies are properly imported and declared in...
Read more >
VueJS 3 : "export 'default' (imported as 'Vue') was not found in ...
Im using VueJS 3 and getting this in my terminal: ERROR : "export 'default' (imported as 'Vue') was not found in 'vue' import...
Read more >
引入vuex 报错警告“export 'inject' was not found in 'vue'
创建项目时没有下载vuex 后期自己下载的,看了一下下载的vuex版本时4.x.x 页面报错解决办法: 1、看一下自己的vuex版本是不是4.x.x ,如果是,先卸载vuex ...
Read more >
export 'default' imported as was not found in ... - YouTube
export 'default' imported as was not found in components possible exports default error fixed react. 10K views 10 months ago.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found