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.

import/named does not report non-existent exports in yarn workspace

See original GitHub issue

Screen Shot 2021-03-12 at 9 45 07 AM

https://github.com/jd2rogers2/eslint-plugin-import-bug-minimal-repo for testing it for yourself

as seen above, no report for import/named despite not having an helloFooV2 export from foo/index.js foo and bar are both separate workspaces, bar lists foo as a dependency, and foo is in node_modules
i would expect it to report maybe a larger issue as there is also https://github.com/benmosher/eslint-plugin-import/issues/1832

Issue Analytics

  • State:open
  • Created 3 years ago
  • Comments:5

github_iconTop GitHub Comments

1reaction
Skidlecommented, Jul 7, 2021

@jd2rogers2 you need also to change require to import from in bar.js. Works for me here 😃

0reactions
jd2rogers2commented, Jun 25, 2021

@Skidle still no luck on my end 😦 i tried out your solution here but i don’t get any eslint reports for the import that i expect should receive an error (even added new rule to make sure eslint command is running correctly) Screen Shot 2021-06-25 at 3 03 14 PM

were you testing in your own repo or by cloning down mine? if you’re working in another project would love to be able to find out the differences somehow and thanks again for you help and time on this!

Read more comments on GitHub >

github_iconTop Results From Across the Web

import/named does not report non-existent exports in yarn ...
change exports in foo workspace to ES6 exports (same for imports in bar ); add 'import/ignore': ['!^@my'], under settings in eslint ...
Read more >
import/named does not report non-existent exports in yarn workspace
import/named does not report non-existent exports in yarn workspace.
Read more >
eslint-plugin-import | Yarn - Package Manager
This plugin intends to support linting of ES2015+ (ES6+) import/export syntax, and prevent issues with misspelling of file paths and import names.
Read more >
Module has no exported member error in TypeScript
ts does not export a function named multiply , so when we try to import a non-existent member from the module, we get...
Read more >
Common Error Details - Snowpack
json “exports” does not include entry#. Node.js recently added support for a package.json “exports” entry that defines which files you can and cannot...
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