When require a [.node] file within a [.asar] package, there is an unexpected issue with the Mac system. The error message states:
Error: dlopen(/Applications/xx.app/Contents/Resources/app/application.asar//../wrapper.node, 0x0001):
tried: '/Applications/xx.app/Contents/Resources/app/application.asar//../wrapper.node' (errno=20),
'/System/Volumes/Preboot/Cryptexes/OS/Applications/xx.app/Contents/Resources/app/application.asar//../wrapper.node' (no such file),
'/Applications/xx.app/Contents/Resources/app/application.asar//../wrapper.node'(errno=20)
However, it can be opened when using the absolute path:
/Applications/xx.app/Contents/Resources/app/wrapper.node
To resolve this, I've used path.join to format the path.
This PR contains a:
Motivation / Use-Case
When require a [.node] file within a [.asar] package, there is an unexpected issue with the Mac system. The error message states:
However, it can be opened when using the absolute path:
/Applications/xx.app/Contents/Resources/app/wrapper.node
To resolve this, I've usedpath.join
to format the path.similar issue: https://github.com/webpack-contrib/node-loader/issues/132
Breaking Changes
no
Additional Info