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

Prebuild install does not work with scoped packages where the scope name has a dash #147

Closed
Valandur opened this issue Apr 21, 2021 · 1 comment · Fixed by #148
Closed
Labels
bug Something isn't working

Comments

@Valandur
Copy link
Contributor

According to the npm docs a scope can contain URL-safe characters, no leading dots or underscores. This includes dashes and/or underscores within the name (e.g. @scope-name/package).

However, the following line in utils uses the \w regex match, which only matches [a-zA-Z0-9_], which does not include dashes. This makes prebuild-install look for the binaries in the wrong location (e.g. https://github.com/scope-name/package/releases/download/v1.0.0/@scope-name/package-v1.0.0-node-v83-win32-x64.tar.gz) which obviously doesn't work.

var pkgName = opts.pkg.name.replace(/^@\w+\//, '')

@vweevers vweevers added the bug Something isn't working label Apr 21, 2021
@vweevers
Copy link
Member

PR is welcome

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Development

Successfully merging a pull request may close this issue.

2 participants