You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to use xstate-tree with Astro and am getting this error.
@koordinates/xstate-tree doesn't appear to be written in CJS, but also doesn't appear to be a valid ES module (i.e. it doesn't have "type": "module" or an .mjs extension for the entry point). Please contact the package author to fix.
The workaround is to add this to astro.config.mjs
exportdefaultdefineConfig({// ...the rest of your config, and then thisvite: {ssr: {noExternal: ['@koordinates/xstate-tree'],}},});
Just letting you know I have seen this, not sure when I will get a chance to look at it. This all stems from the fact it was pulled out of our monorepo which emits ES2020 but doesn't use ESM because of other problems, so we run babel over all our internal packages.
I think I'll have some time to resolve this over the holidays.
Currently only CJS style code is shipped. Update package to ship ESM and CJS code and update package.json with ESM functionality
The text was updated successfully, but these errors were encountered: