SavageCore / node-ffprobe-installer

Platform independent binary installer of FFprobe for node projects
https://www.npmjs.com/package/@ffprobe-installer/ffprobe
72 stars 30 forks source link

Cannot find module '@ffprobe-installer/linux-x64/ffprobe' #274

Closed xts-bit closed 1 month ago

xts-bit commented 10 months ago

While deploying code on Vercel this package gives this error, using node 18 which is the latest version of @ffprobe-installer/ffprobe, However, it works fine on my local machine.

My Code:

import { path as ffprobePath } from '@ffprobe-installer/ffprobe';

router.get("/get-ffprobe", async (req, res) => {
    res.status(200).json({ ffprobePath })
})

Error:

Cannot find module '@ffprobe-installer/linux-x64/ffprobe'
Require stack:
- /var/task/node_modules/@ffprobe-installer/ffprobe/index.js
Did you forget to add it to "dependencies" in `package.json`?
xts-bit commented 10 months ago

@SavageCore can you help?

jcham commented 10 months ago

I'm seeing this same problem also.

xts-bit commented 10 months ago

@jcham Did you fix?

antti-manninen-vmv commented 9 months ago

I had this too. It was most likely caused by bug in npm cli. node_modules needs to be removed before recreating package-lock.json.

https://github.com/npm/cli/issues/4828

SavageCore commented 1 month ago

Looks like @antti-manninen-vmv has the "fix". Closing.