Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

npm workspaces path issues #60

Open
prsauer opened this issue Oct 30, 2023 · 1 comment
Open

npm workspaces path issues #60

prsauer opened this issue Oct 30, 2023 · 1 comment

Comments

@prsauer
Copy link

prsauer commented Oct 30, 2023

I'm trying to install a library for an electron app I am writing

In the library they use

const lib = require('node-gyp-build')(__dirname);

to load the module.

This seems correct based on the README here. However, my project uses npm workspaces and this is causing a problem:

__dirname evaluates to myproject/packages/mypackage even though the library is actually installed to myproject/node_modules/library

The end result being an error:

 No native build was found for platform=win32 arch=x64 runtime=node abi=93 uv=1 libc=glibc node=16.18.1

I'm not sure how to proceed -- ultimately I could patch the package to force it to use the correct path but I'm curious if there is a more reasonable path forward for supporting npm workspaces using this tool

@ph342
Copy link

ph342 commented Jul 2, 2024

We have the same issue.
@prsauer Have you had any luck with this? Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants