Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error [ERR_MODULE_NOT_FOUND]: Cannot find package 'player.style' #327

Open
nikitok opened this issue Dec 23, 2024 · 3 comments
Open

Error [ERR_MODULE_NOT_FOUND]: Cannot find package 'player.style' #327

nikitok opened this issue Dec 23, 2024 · 3 comments

Comments

@nikitok
Copy link

nikitok commented Dec 23, 2024

The issue occurs only when deploying via Vercel:

Error [ERR_MODULE_NOT_FOUND]: Cannot find package 'player.style' imported from /var/task/node_modules/next-video/dist/components/players/default-player.js at packageResolve (node:internal/modules/esm/resolve:858:9) at moduleResolve (node:internal/modules/esm/resolve:931:18) at moduleResolveWithNodePath (node:internal/modules/esm/resolve:1173:14) at defaultResolve (node:internal/modules/esm/resolve:1216:79) at ModuleLoader.defaultResolve (node:internal/modules/esm/loader:542:12) at ModuleLoader.resolve (node:internal/modules/esm/loader:510:25) at ModuleLoader.getModuleJob (node:internal/modules/esm/loader:239:38) at ModuleWrap.<anonymous> (node:internal/modules/esm/module_job:96:40) at link (node:internal/modules/esm/module_job:95:36) { code: 'ERR_MODULE_NOT_FOUND', page: '/helpers/alerts' }

package.json:

{ "next-video": "2.0.0", "player.style": "^0.1.1" }

@SaverioGarzi
Copy link

Same issue here!
package.json:
next-video 2.0.0
next.js version 14.2.5

Node 20, locally and in Vercel.
Using "Pages".

I solved, downgrading to the version 1.4.0.

@luwes
Copy link
Collaborator

luwes commented Jan 10, 2025

could you try removing node_modules and re-installing? (maybe the lock file didn't update correctly)
can you see the node_modules/player.style folder?

I haven't experienced this issue on my end. player.style should be there as a dependency of next-video.

@SaverioGarzi
Copy link

I re-updated to the latest version, deleted the node_modules, reinstalled...
I can see the "player.style" folder in my node modules folder, and locally is all working as expected.

When i push on vercel, same error as before.
This is wat is logged on vercel:

⨯ Error [ERR_MODULE_NOT_FOUND]: Cannot find package 'player.style' imported from /var/task/node_modules/next-video/dist/components/players/default-player.js at packageResolve (node:internal/modules/esm/resolve:858:9) at moduleResolve (node:internal/modules/esm/resolve:931:18) at moduleResolveWithNodePath (node:internal/modules/esm/resolve:1173:14) at defaultResolve (node:internal/modules/esm/resolve:1216:79) at ModuleLoader.defaultResolve (node:internal/modules/esm/loader:542:12) at ModuleLoader.resolve (node:internal/modules/esm/loader:510:25) at ModuleLoader.getModuleJob (node:internal/modules/esm/loader:239:38) at ModuleWrap.<anonymous> (node:internal/modules/esm/module_job:96:40) at link (node:internal/modules/esm/module_job:95:36) { code: 'ERR_MODULE_NOT_FOUND', page: '/' }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants