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

Error if repository declaration is verbose #3

Open
axis-tip opened this issue Sep 16, 2016 · 1 comment
Open

Error if repository declaration is verbose #3

axis-tip opened this issue Sep 16, 2016 · 1 comment

Comments

@axis-tip
Copy link

axis-tip commented Sep 16, 2016

In package.json if you have a simple repository declaration like this then there are no issues:

{
    "repository": "http://github.com/easystatic/easystatic.git"
}

However, if you have a more verbose declaration like this:

{
    "repository": {
        "type": "git",
        "url": "git+https://github.com/easystatic/easystatic.git"
    }
}

Then you get the following strange error when you do easystatic start docs:

> easystatic start docs

TypeError: Request path contains unescaped characters
    at new ClientRequest (_http_client.js:53:11)
    at Object.exports.request (http.js:31:10)
    at Object.exports.request (https.js:199:15)
    at Object.exports.get (https.js:203:21)
    at /usr/local/lib/node_modules/easystatic/lib/info.js:11:23
    at /usr/local/lib/node_modules/easystatic/lib/info.js:9:12
    at next (native)
    at step (/usr/local/lib/node_modules/easystatic/lib/info.js:133:191)
    at /usr/local/lib/node_modules/easystatic/lib/info.js:133:451
    at /usr/local/lib/node_modules/easystatic/lib/info.js:133:99
    at tryFetch (/usr/local/lib/node_modules/easystatic/lib/info.js:38:16)
    at /usr/local/lib/node_modules/easystatic/lib/info.js:89:18
    at next (native)
    at step (/usr/local/lib/node_modules/easystatic/lib/info.js:133:191)
    at /usr/local/lib/node_modules/easystatic/lib/info.js:133:451
    at /usr/local/lib/node_modules/easystatic/lib/info.js:133:99

This is hard to debug and I only realized this by trial and error after wasting a few hours. The error should either be more obvious, or the verbose format should just be handled.

For now the workaround is to switch to the simpler syntax.

@axis-tip
Copy link
Author

axis-tip commented Sep 16, 2016

BTW, if you guys have any thoughts on this issue... much appreciated. 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

0 participants