rive-app / rive-react

React runtime for Rive
https://rive-app.github.io/rive-react
MIT License
808 stars 32 forks source link

Named export 'Alignment' not found In Remix Run #218

Open lenniezelk opened 10 months ago

lenniezelk commented 10 months ago

Getting this error when using '@rive-app/react-canvas' in Remix run

Screenshot 2023-11-23 at 17 30 27

Typescript version: 5.1.6 React version: 18.2.0 Remix Run version: 2.3.1

GiancarlosIO commented 3 months ago

Same issue with rsbuild

https://github.com/web-infra-dev/rspack/issues/7022

mckayreedmoore commented 1 month ago

I have the same issue.

Error:

Internal server error: [vite] Named export 'Alignment' not found. The requested module '@rive-app/react-canvas' is a CommonJS module, which may not support all module.exports as named exports. CommonJS modules can always be imported via the default export, for example using: import pkg from '@rive-app/react-canvas'; const {Layout, Fit, Alignment} = pkg;

Using the suggested changes doesn't work. When they are implemented it says that the names don't exist in the package.

@rive-app/react-canvas : 4.14.8 typescript : 5.1.6 remix-run : 2.11.2 react : 18.2.20