Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Package subpath "./node_modules/yargs/package.json" is not defined by exports in undefined #1843

Closed
YashTotale opened this issue Dec 25, 2020 · 4 comments

Comments

@YashTotale
Copy link

My rollup build is unable to resolve yargs.

Here's the full error:

Plugin node-resolve: Could not resolve import "./src/cli/index.ts" in ".". Package subpath
"./node_modules/yargs/package.json" is not defined by "exports" in undefined

Here's my GitHub repository.

There's another issue (#1817) that referenced a similar problem, however, the fix for that one does not seem to work for this issue.

My Yargs version is 16.2.0.

@bcoe bcoe added the bug label Jan 4, 2021
@bcoe
Copy link
Member

bcoe commented Jan 4, 2021

@YashTotale I suggest opening an issue with rollup as well. As I don't know where to start investigating this, and yargs is working for our own usage of rollup.

If there's additional configuration I can add to the export map that helps, I'm happy to.

@YashTotale
Copy link
Author

@bcoe I decided not to use Rollup and use Yargs' recommended @vercel/ncc to build and compile my project.

@bcoe
Copy link
Member

bcoe commented Jan 8, 2021

@YashTotale 👍 sounds good, I'd still love to know what the heck is happening, I will need to dig into it at some point.

Is ncc working well?

@YashTotale
Copy link
Author

Yeah, ncc is working great!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants