Package subpath './package.json' is not defined by "exports" #10
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
I was using this package in https://github.com/sveltejs/sapper-template/tree/rollup
But it reports error:
Do you have a stack trace for the error? I guess someone is directly requiring package.json, which worked fine in a pre-node-14 world, but is likely to cause this error for packages that declare an
exportsfield now. The best way to fix it is probably to adjust that package to just load and parse the file properly.What I did is adding at the beginning of the file
sapper-template-rollup/src/routes/index.svelte:And when I run
npm run dev, it reports:This seems to be an issue with rollup-plugin-svelte (see this pr, for example). I'm going to close this here.