Stream: implementers
Topic: npm from simpifier and deps
nicola (RIO/SS) (Aug 25 2021 at 12:49):
Is it only bug in my environment - when I install a package from the simplifier registry - it installs package but does not install dependencies
nicola (RIO/SS) (Aug 26 2021 at 09:28):
Will try again. Was anybody able to install all deps for simplifier npm package?
nicola (RIO/SS) (Aug 26 2021 at 09:37):
The problem: I create package.json like this
{
"dependencies": {
"hl7.fhir.us.carin-bb": "^1.1.0",
}
}
Set simplifier as main registry
npm config set registry https://packages.simplifier.net
Do npm install
npm installs the carin module, but not dependency modules
> ls node_modules
hl7.fhir.us.carin-bb
should be
hl7.fhir.r4.core
hl7.fhir.us.carin-bb
hl7.fhir.us.core
Because carn-bb depends on us.core and r4.core:
cat node_modules/hl7.fhir.us.carin-bb/package.json
{
"name": "hl7.fhir.us.carin-bb",
"version": "1.1.0",
"tools-version": 3,
"type": "fhir.ig",
"date": "20210702175256",
"license": "CC0-1.0",
"canonical": "http://hl7.org/fhir/us/carin-bb",
"url": "http://hl7.org/fhir/us/carin-bb/STU1.1",
"title": "CARIN Consumer Directed Payer Data Exchange (CARIN IG for Blue Button®)",
"description": "CARIN Consumer Directed Payer Data Exchange (CARIN IG for Blue Button®) (built Fri, Jul 2, 2021 17:52+0000+00:00)",
"fhirVersions": [
"4.0.1"
],
"dependencies": {
"hl7.fhir.r4.core": "4.0.1",
"hl7.fhir.us.core": "3.1.1"
},
"author": "HL7 Financial Management Working Group",
"maintainers": [
{
"name": "HL7 Financial Management Working Group",
"email": "fm@lists.HL7.org",
"url": "http://www.hl7.org/Special/committees/fm/index.cfm"
}
],
"directories": {
"lib": "package",
"example": "example"
},
"jurisdiction": "urn:iso:std:iso:3166#US"
}
Alexander Zautke (Aug 26 2021 at 09:38):
@Matthijs van der Wielen
Yurii Makhotkin (Sep 14 2021 at 10:22):
Can confirm. I have the same issue in my env. And it seems I found workaround
If I do
$ npm --registry https://packages.simplifier.net install hl7.fhir.us.core@3.0.1
added 1 package in 849ms
$ ls node_modules
hl7.fhir.us.core
No dependencies installed as you can see.
But if I install by tar url
$ npm --registry https://packages.simplifier.net install https://packages.simplifier.net/hl7.fhir.us.core/3.0.1
added 2 packages in 3s
$ ls node_modules
hl7.fhir.r4.core hl7.fhir.us.core
Then dependencies are installed correctly
$ npm --version
7.21.1
nicola (RIO/SS) (Sep 14 2021 at 10:32):
@Martijn Harthoorn Yurii provided details about deps problems
Yurii Makhotkin (Sep 14 2021 at 11:56):
If i use npm 6 and do npm install
after npm install <package>
then dependencies are installed:
$ npm --registry https://packages.simplifier.net install hl7.fhir.us.core@3.0.1
+ hl7.fhir.us.core@3.0.1
added 1 package from 1 contributor in 0.822s
$ ls node_modules
hl7.fhir.us.core
$ npm --registry https://packages.simplifier.net install
added 1 package from 1 contributor in 1.507s
$ ls node_modules
hl7.fhir.r4.core hl7.fhir.us.core
$ npm --version
6.14.15
Yurii Makhotkin (Sep 14 2021 at 12:03):
If I have a package dependency in package.json
and do npm install
it installs only this dependency without its dependencies, and if I do npm install
again then dependencies are installed correctly too
$ ls
package.json
$ cat package.json
{
"name": "myproj",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"keywords": [],
"author": "",
"license": "ISC",
"dependencies": {
"hl7.fhir.us.core": "3.0.1"
}
}
$ npm --registry https://packages.simplifier.net install
added 1 package from 1 contributor in 0.991s
$ ls node_modules
hl7.fhir.us.core
$ npm --registry https://packages.simplifier.net install
added 1 package from 1 contributor in 1.382s
$ ls node_modules
hl7.fhir.r4.core hl7.fhir.us.core
$ npm --version
6.14.15
Last updated: Apr 12 2022 at 19:14 UTC