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

parsed.host.replace throws NPE when called without a valid URL #37

Closed
trxcllnt opened this issue Jul 7, 2018 · 1 comment
Closed

parsed.host.replace throws NPE when called without a valid URL #37

trxcllnt opened this issue Jul 7, 2018 · 1 comment

Comments

@trxcllnt
Copy link

trxcllnt commented Jul 7, 2018

We use npm-run-all to execute multiple npm scripts. It looks like npm-run-all uses the normalize-package-data library to read package.json files.

That library (which has a ^2.1.4 dependency on hosted-git-info) calls hostedGitInfo.fromUrl() with the version of each dev and prod dependency version.

With the v2.7.0 release, passing fromUrl a semver string now throws an error on line 61 at the parsed.host.replace callsite, presumably because a semver string doesn't parse to a valid URL, which is reasonable.

However the unfortunate consequences are that using npm-run-all from a fresh npm-install yields:

$ npm run build

> @my-project@1.0.0 build /home/me/dev/my-project
> run-s clean compile

ERROR: Cannot read property 'replace' of null

:<

@trxcllnt
Copy link
Author

trxcllnt commented Jul 7, 2018

damn just edged out by #35. closing as dupe

@trxcllnt trxcllnt closed this as completed Jul 7, 2018
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

1 participant