You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For https://github.com/ajrcarey/pdfium-render library I need to dynamically link a binary.
While this works locally, when package is published at npm and later installed - path becomes incorrect:
// resolved incorrect path when used as node package
/home/me/xxx/api/apps/api/pdfium-linux-x64/lib/libpdfium.so
// correct path
/home/me/xxx/api/apps/api/node_modules/@pkg-prefix/pkg-name/pdfium-linux-x64/lib/libpdfium.so
Code example (binary located in root folder)
let pdfium_platform_library_folder = if env::consts::OS == "macos" {
"pdfium-mac-x64/lib"
} else {
"pdfium-linux-x64/lib"
};
let pdfium_platform_library_path = env::current_dir()
.unwrap()
.join(pdfium_platform_library_folder);
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
For
https://github.com/ajrcarey/pdfium-render
library I need to dynamically link a binary.While this works locally, when package is published at npm and later installed -
path
becomes incorrect:Code example (binary located in root folder)
Beta Was this translation helpful? Give feedback.
All reactions