Closed AnhNhan closed 1 year ago
Hello,
currently this package makes fixed assumptions about the node_modules folder, which is not a given when using Yarn 2 in Plug-and-Play mode.
node_modules
It would be better to use require.resolve(), e.g.
require.resolve()
// this here const npm3Path = path.resolve(__dirname, '..', target); // becomes this const npm3Path = require.resolve('@ffprobe-installer/' + target + '/' + binary) // example require.resolve('@ffprobe-installer/win32-x64/ffprobe.exe') // returns const result = 'C:\\Users\\user\\dev\\project\\.yarn\\unplugged\\@ffprobe-installer-win32-x64-npm-5.0.0-6664c83f60\\node_modules\\@ffprobe-installer\\win32-x64\\ffprobe.exe';
I'm also waiting this issue is resolved.
I myself don't use Yarn PnP but happy to receive a full PR also covering npm2Path (if needed)
Hello,
currently this package makes fixed assumptions about the
node_modules
folder, which is not a given when using Yarn 2 in Plug-and-Play mode.It would be better to use
require.resolve()
, e.g.