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
{{ message }}
Repository navigation
Makefile generator creates misplaced build artifacts for dependencies outside of binding.gyp root dir #325
A binding.gyp with dependencies that live outside of its directory will create misplaced artifacts with the makefile generator (usually, on mac & linux). The dependency will be resolved to a relative path with parent directory segments (../../*) and those get joined as-is to the build directory (./build/../../*), resulting in build files outside of the build directory. This result may confuse other tooling too, unfortunately.
For example, the following code in the makefile generator produces a path like ./build/../../node_modules/node-addon-api/node_addon_api.target.mk:
I have a multi-workspace project set up like this:
super/ (root)
package.json (defines "workspaces")
workspaces/
native/
package.json
binding.gyp
super has no dependencies, and native only depends on node-gyp and node-addon-api. Note that in this setup, npm hoists node-addon-gyp to the root node_modules/.
node-addon-apirecommends adding it as a dependency in binding.gyp:
Activity