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
Using lottie-react in a Next.js 13 project with typescript, using the player on a page using Next.js 13's new app directory setup, on page load there is an error.
Server Error
TypeError: Class extends value undefined is not a constructor or null
Full error
error - (sc_server)\node_modules\@lottiefiles\react-lottie-player\dist\lottie-react.js (15:144) @ __extends
error - TypeError: Class extends value undefined is not a constructor or null
at __extends (webpack-internal:///(sc_server)/./node_modules/@lottiefiles/react-lottie-player/dist/lottie-react.js:44:53)
at eval (webpack-internal:///(sc_server)/./node_modules/@lottiefiles/react-lottie-player/dist/lottie-react.js:7064:12)
at eval (webpack-internal:///(sc_server)/./node_modules/@lottiefiles/react-lottie-player/dist/lottie-react.js:7311:2)
at Object.(sc_server)/./node_modules/@lottiefiles/react-lottie-player/dist/lottie-react.js (C:\Users\overt\Developer\blueprint\.next\server\app\page.js:538:1)
at __webpack_require__ (C:\Users\overt\Developer\blueprint\.next\server\webpack-runtime.js:33:42)
at eval (webpack-internal:///(sc_server)/./app/page.tsx:7:90)
at Object.(sc_server)/./app/page.tsx (C:\Users\overt\Developer\blueprint\.next\server\app\page.js:527:1)
at __webpack_require__ (C:\Users\overt\Developer\blueprint\.next\server\webpack-runtime.js:33:42)
at Object.page (webpack-internal:///(sc_server)/./node_modules/next/dist/build/webpack/loaders/next-app-loader.js?name=app%2Fpage&appPaths=%2Fpage&pagePath=private-next-app-dir%2Fpage.tsx&appDir=C%3A%5CUsers%5Covert%5CDeveloper%5Cblueprint%5Capp&pageExtensions=tsx&pageExtensions=ts&pageExtensions=jsx&pageExtensions=js&rootDir=C%3A%5CUsers%5Covert%5CDeveloper%5Cblueprint&isDev=true&tsconfigPath=tsconfig.json!:19:114)
at collectGenerateParams (C:\Users\overt\Developer\blueprint\node_modules\next\dist\build\utils.js:710:194) {
type: 'TypeError',
page: '/'
}
null
This package doesn't seem to support server components behaviors, as suggested by nextjs documentation we'll have to wrap the Player component inside a client-component to make it work.
Overview
Using lottie-react in a Next.js 13 project with typescript, using the player on a page using Next.js 13's new app directory setup, on page load there is an error.
Core error
Full error
package.json
My code
app/page.tsx
Consuming repo
My own private repo using https://github.com/LottieFiles/lottie-react
Labels
Type: Bug
label to this issue.The text was updated successfully, but these errors were encountered: