question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Can not install due to jsonpath

See original GitHub issue

I’m submitting a…

  • bug report
  • feature request

What is the current behavior?

When trying to install spectral using npm install @stoplight/spectral I get the following error:

npm ERR! code 128
npm ERR! Command failed: C:\Program Files\Git\cmd\git.EXE clone --mirror -q https://github.com/stoplightio/jsonpath.git C:\Data\npm\cache\_cacache\tmp\git-clone-9c9fbadd\.git --config core.longpaths=true
npm ERR! warning: templates not found in C:\Users\USER\AppData\Local\Temp\pacote-git-template-tmp\git-clone-818f94da
npm ERR! fatal: unable to access 'https://github.com/stoplightio/jsonpath.git/': SSL certificate problem: self signed certificate in certificate chain
npm ERR!

I’m behind a corporate proxy which is why there is a self-signed certificate.

What is the expected behavior?

It installs without errors

What is the motivation / use case for changing the behavior?

Spectral is unusable for me without a fix. I literally can’t download it via NPM.

Please tell us about your environment:

  • Version: 1.x or above
  • OS: Windows 10
  • Package manager: NPM
  • Node version: 8.13.0

Other information

Running things behind a corporate proxy is a known bad experience. In this case, things break because of the hard https reference to a forked repository.

Does this have to be a reference to the fork? What’s wrong with jsonpath@1.0.0?

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:14 (10 by maintainers)

github_iconTop GitHub Comments

1reaction
P0lipcommented, May 20, 2019

@Lakitna really glad to hear the workaround did the trick for you. We’ll sort out that jsonpath dependency issue sooner or later since it’s something that annoys us as well.

1reaction
P0lipcommented, May 17, 2019

@Lakitna, as a workaround, you can try setting a custom resolution in your package.json, as follows

"resolutions": {
  "jsonpath": "http://github.com/stoplightio/jsonpath#f1c0e9e634da2d45671b7639fa0a99afc807da1"
},

Once a resolution is added, you should be able to successfully install Spectral using npm or yarn. If it still doesn’t work and the cert is needed for some reason, you can download our repo and provide a different link instead. It also accepts filesystem via file: syntax, so you can simply provide a path to the physical directory on your machine.

Note: if there is any other dependency requiring jsonpath, it will use our fork instead of the version defined in its package.json. This shouldn’t be a real problem, though, as we didn’t introduce any breaking changes to our fork.

As Phil said, we haven’t sent a PR to upstream yet, therefore you might need to stick to that workaround.

Read more comments on GitHub >

github_iconTop Results From Across the Web

python - I can't install json module - Stack Overflow
Python has a built-in JSON module. If that's what you're looking for. Just import in your script or shell: import json.
Read more >
How to install the JSONPath library? [#2994744] | Drupal.org
I can see that there is a new folder in the "/vendor" directory containing "/peekmo/jsonpath/src/Peekmo/JsonPath". I tried everything sugested ...
Read more >
Cannot install freestanding JSON language server using npm
Steps to Reproduce: Go to the vscode-json-languageserver page and read the instructions in the "Integrate" section: ... Open a terminal and run ...
Read more >
jsonpath-rw - PyPI
pip install jsonpath-rw. Then: $ python >>> from jsonpath_rw import jsonpath, parse # A robust parser, not just a regex. (Makes powerful extensions...
Read more >
package.json - npm Docs
It must be actual JSON, not just a JavaScript object literal. ... When this package is installed as a dependency in another package,...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found