Open johnlop opened 5 years ago
I've only ever used browserify, so not sure about this. If you look in your node_modules directory, is the file available there?
Yeah the file is there and the other modules seem ok.
Yeah the file is there and the other modules seem ok.
hi,I met the same problem. Have you solved it?
Same problem -
Error: Cannot find module 'C:\Users\user\Documents\PROJECTS\....\node_modules\@ffmpeg-installer\win32-x64\package.json'
Same problem: Cannot find module '....../node_modules/@ffmpeg-installer/darwin-x64/package.json' in vue project and I tried yard remove and reinstall, doesn't work.
@johnlop with nodejs you can try to use something like this:
module.exports = {
// ...some configs
target: 'node',
plugins: [
new webpack.EnvironmentPlugin({
FLUENTFFMPEG_COV: false,
}),
],
output: {
libraryTarget: 'commonjs',
},
externals: [
nodeExternals(),
{ '@ffmpeg-installer/ffmpeg': { commonjs: '@ffmpeg-installer/ffmpeg' } },
{ 'fluent-ffmpeg': { commonjs: 'fluent-ffmpeg' } },
],
}
but it can works if you use a webpack-node-externals
- I don't know how to solve the issue without that
Same problem ~~~
@pereslavtsev Your solution worked for me. Using electron + webpack. Thanks!
Same problem ...
i used this solution because some dependencies are using es6 export. (i'm using vue with electron-builder. not sure it works with plain webpack) simillar with answer on above;
// webpack.config.js
module.exports = {
// ...
externals: [
nodeExternals({
modulesFromFile: {
fileName: './package.json',
includeInBundle: ['devDependencies', 'dependencies'],
excludeFromBundle: ['excludeFromBundle'],
},
}),
],
}
// package.json
{
// some configs
// you dont have to remove this packages from dependencies
"excludeFromBundle": {
"@ffmpeg-installer/ffmpeg": "^1.1.0",
"fluent-ffmpeg": "^2.1.2"
}
}
Same problem -
Error: Cannot find module 'C:\Users\user\Documents\PROJECTS\....\node_modules\@ffmpeg-installer\win32-x64\package.json'
Hello, have you solved this problem? How to solve it?
@pereslavtsev 's solution worked for me as well.
Hi, I'm adding Webpack to my NodeJS project but having issues with ffmpeg-installer. The build process works but when running the app I get the following error:
Not sure what to do to fix this but anyway I'm curious if anyone else has used Webpack with this package.
Info:
Thanks.