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

SUSHI does not install dependencies #1045

Closed
me-at-gematik opened this issue Mar 10, 2022 · 10 comments · Fixed by #1059
Closed

SUSHI does not install dependencies #1045

me-at-gematik opened this issue Mar 10, 2022 · 10 comments · Fixed by #1059
Labels
bug Something isn't working

Comments

@me-at-gematik
Copy link

me-at-gematik commented Mar 10, 2022

I have freshly installed SUSHI and tried SUSHI on the tutorials. They require the package hl7.fhir.r4.core#4.0.1 as a dependency. When running SUSHI with
sushi .
I get the following output and error:

$ sushi .
info Running SUSHI v2.3.0 (implements FHIR Shorthand specification v1.2.0)
info Arguments:
info /home/dev/fsh-tutorial-master/FishExample
info No output path specified. Output to .
info Using configuration file: /home/dev/fsh-tutorial-master/FishExample/sushi-config.yaml
info Importing FSH text...
info Preprocessed 2 documents with 0 aliases.
info Imported 2 definitions and 0 instances.
info Checking local cache for hl7.fhir.r4.core#4.0.1...
info Did not find hl7.fhir.r4.core#4.0.1 in local cache.
info Downloading hl7.fhir.r4.core#4.0.1...
info Downloading hl7.fhir.r4.core#4.0.1...
error Failed to load hl7.fhir.r4.core#4.0.1: The package hl7.fhir.r4.core#4.0.1 could not be loaded locally or from the FHIR package registry.
error Valid StructureDefinition resource not found. The FHIR package in your local cache may be corrupt. Local FHIR cache can be found at /.fhir/packages. For more information, see https://wiki.hl7.org/FHIR_Package_Cache#Location.

You could work-around the issue by installing the missing package locally via npm or firely terminal. Unfortunately firely terminal even installs the packages in a different folder than is expected by SUSHI. So even the work-around is rather awkward.

I did setup the proxy correctly using the environment variables http_proxy and https_proxy. npm was successfully installing stuff through the proxy, when unsetting the proxy variables npm also did not install stuff.

@cmoesel
Copy link
Member

cmoesel commented Mar 10, 2022

Thanks for reporting this, @me-at-gematik. It's possible that the libraries we use for downloading dependencies are not respecting the proxy settings. We'll look into it.

I could be wrong, but I think the latest beta versions of Firely install to the correct location in the FHIR cache. You may want to give that a try to see if it helps.

@me-at-gematik
Copy link
Author

Good luck in fixing the issue and thanks for pointing out the new firely terminal fix.

@guhanthuran
Copy link
Contributor

In our systems, when we export the http_proxy and https_proxy environment variables, SUSHI does attempt to use the specified proxies. What version of SUSHI are you using, and are you calling SUSHI directly, or are you letting the IG Publisher call SUSHI?

@me-at-gematik
Copy link
Author

Hi @guhanthuran,

I am using SUSHI 2.3.0 directly, not via IG Publisher.

@cmoesel
Copy link
Member

cmoesel commented Mar 14, 2022

We're having trouble reproducing this. How are you specifying the proxies in http_proxy/https_proxy? Are you just specifying hostname (e.g., export http_proxy=my.proxy.org) or hostname and port (e.g., http_proxy=my.proxy.org:80) or something else?

@guhanthuran
Copy link
Contributor

Hello @me-at-gematik,

Just curious, what operating system are you using?

@me-at-gematik
Copy link
Author

We're having trouble reproducing this. How are you specifying the proxies in http_proxy/https_proxy? Are you just specifying hostname (e.g., export http_proxy=my.proxy.org) or hostname and port (e.g., http_proxy=my.proxy.org:80) or something else?

I have set the proxies like this: export http(s)_proxy=http(s)://<someIP>:<port>

This is the output of
env|grep proxy:

https_proxy=http://<someIP>:<port>/
http_proxy=http://<someIP>:<port>/

@me-at-gematik
Copy link
Author

Hello @me-at-gematik,

Just curious, what operating system are you using?

Ubuntu 20.04.2 LTS

@guhanthuran
Copy link
Contributor

guhanthuran commented Mar 18, 2022

Hi @me-at-gematik

Taking a look at how you set up your proxy, we noticed that when you output the env variables, there's a / at the end. We think that could possibly cause an issue. Can you try removing the trailing slash from the variables?

https_proxy=http://<someIP>:<port>/
http_proxy=http://<someIP>:<port>/

@me-at-gematik
Copy link
Author

Hi @me-at-gematik

Taking a look at how you set up your proxy, we noticed that when you output the env variables, there's a / at the end. We think that could possibly cause an issue. Can you try removing the trailing slash from the variables?

https_proxy=http://:/
http_proxy=http://:/

Hi @guhanthuran,

I have removed the trailing slash from the proxy variables. But the issue still occurs in the same way.

$ env|grep proxy
https_proxy=http://192.168.110.10:3128
http_proxy=http://192.168.110.10:3128

@cmoesel cmoesel added bug Something isn't working added to backlog labels Mar 24, 2022
@guhanthuran guhanthuran linked a pull request Apr 6, 2022 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants