nix-community / npmlock2nix

nixify npm based packages [maintainer=@andir]
Apache License 2.0
130 stars 42 forks source link

slash in npm registry URL being replaced with %2f #117

Closed tshaynik closed 2 years ago

tshaynik commented 3 years ago

I'm seeing an issue in dependencies with names that look like @react-native-community/cli in the package-lock.json, with resolved URLs that look like "https://registry.npmjs.org/@react-native-community/cli/-/cli-3.2.1.tgz"

       > > /build/node_modules/.hooks/preinstall
       > patching script interpreter paths in .
       > npm ERR! code ENOTCACHEDPackageMetaData error for stacktrace[0m
       > npm ERR! request to https://registry.npmjs.org/@react-native-community%2fcli failed: cache mode is 'only-if-cached' but no cached response available.

For some reason, / in the name is getting escaped into a %2f, causing the URL to not resolve and npmlock2nix to fail.

tshaynik commented 3 years ago

This appears to be related to this issue in npm: https://github.com/npm/npm/issues/16380 I'm currently looking for a workaround.

whentze commented 2 years ago

@tshaynik this has been closed, but we're still running into it. Did you end up finding a workaround?