-
-
Notifications
You must be signed in to change notification settings - Fork 80
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
Build fails with "flatted" dependency: './package.json' is not defined by "exports" #193
Comments
If a library has I'm not sure there's any reasonable for the Rollup plugin to do here to access this, other than to completely sidestep Node's module resolution and manually load this file and parse it, which doesn't sound ideal. If a package decides to use |
PR here: WebReflection/flatted#54 |
Hey, I appreciate the fast response and PR! This all sounds reasonable. I agree that it seems like more of a flatted problem than a rollup problem, but I do wonder how many other major libraries out there fall into this trap? It may not be ideal to rely on each individual maintainer to merge updates before a library can be used with Svelte. Not saying the trade offs of some edge case workaround are necessarily worth it either, just that it may be worth thinking through. |
With node 14 there is a lot of trouble with packages with explicit exports that do not include package.js. This includes at the moment: - d3-* - mapbox-style-def - threads - float16 The first two are held at their versions for the moment, the latter two are manually removed from yarn.lock. Issue at nodejs: nodejs/node#33460 Issue with rollup: sveltejs/rollup-plugin-svelte#193
We're going to change the behavior related to this. In the meantime, closing as a duplicate of #181 |
Hello!
Recently added a new ultity flatted to my project to handle some circular JSON. Unfortunately, this seems to have broken the build. I get the following error, and the build fails:
Found a discussion of a similar issue with uuid. Seems like flatted could fix this by adding
"./package.json": "./package.json"
to their package.json... but is there no way Svelte rollup can handle this more gracefully? Maybe throw a warning but find the package.json procedurally as a fallback? Flatted is a fairly well used utility (23 million downloads a week), and it seems strange Svelte simply would not support it over what appears to be a fairly small issue.The text was updated successfully, but these errors were encountered: