Replies: 5 comments
-
Okay, I downloaded it here to see the problem. What he really expects is the require syntax in this part of the code for some reason. The little I've been studying has to do with the way the transpiler reads the code, someone with more property will be able to correct me, but for some reason for this part of the package the program expects to receive the require syntax. |
Beta Was this translation helpful? Give feedback.
-
So, what I did to run, I just changed the imports and then it will tell you that windows is not defined because it is running on the server side, so the 'dynamic' you used is good tone and the player works, but I think that it can be palliative, sometimes it changed something that needed directly in node_modules but if there is a minified version (example.min.js) when the deploy occurs, the min version wins. |
Beta Was this translation helpful? Give feedback.
-
my-app/node_modules/fluid-player/src/index.js: module.exports = fluidPlayerInitializer; |
Beta Was this translation helpful? Give feedback.
-
I am not familiar with next.js, but it looks like you are trying to load Fluid Player using CommonJS loader. Fluid Player is a ES2015 module - so it won't work. Besides, Fluid Player uses dynamic imports as well, and those will break if you try above (hls, dash support etc). Closing fluid-player/fluid-player#506 since this does not seem to be a Fluid Player issue. |
Beta Was this translation helpful? Give feedback.
-
So, what will be the fix for this integration? How should I import this package? |
Beta Was this translation helpful? Give feedback.
-
I tried to integrate Fluid Player with latest version of Next.js.
https://codesandbox.io/s/fervent-montalcini-i690v?file=/pages/index.tsx
Can someone explain why this is happening? I tried
dynamic
import with{ ssr: false }
but same error occurred.Any help or insight would be greatly appreciated.
Beta Was this translation helpful? Give feedback.
All reactions