Can not install due to jsonpath
See original GitHub issueI’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:
- Created 4 years ago
- Comments:14 (10 by maintainers)
Top 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 >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@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.@Lakitna, as a workaround, you can try setting a custom resolution in your package.json, as follows
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.