CircleCI will not recognising "npm:.." references to modules #1954
-
I'm building a software of multiple Git Hub repos. The way we are structuring the github repos is that we installing an Observable Framework GitHub repo as an npm module into another repo in order for the latter to use some js modules from the former as visualisations. There is a problem with this, in that even though the CircleCI tests pass on the original repo, when we run them on the repo to which it is installed CircleCI gives us errors like these:
You can mark the path "npm:d3" as external to exclude it from the bundle, which will remove this I have tried marking those imports as external in by esbuild.js file but, that just causes CicleCI to fail the tests with exit code 1 and no information. I have also tried installing d3 in the Observable Framework repo and referencing directly like so: import * as d3 from "d3"; This however, causes npm run build to fail on the Observable Framework repo. I'm not sure what the best way is to proceed? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
PS - I have tried to import the js module from my Observable Framework repo via Observable Cloud like this:
The CircleCI test in the consuming repo still exit with code 1 and no further info. I also tried declaring this module as an external one in the consuming repo esbuild.js like this:
Same outcome. |
Beta Was this translation helpful? Give feedback.
My solution to this was to consume the module from the Observable Framework hosted end rather than the github hosted repo. Referencing as follows then causes no problem for CirceCI:
import { barChart } from "https://displayr-engineering.observablehq.cloud/observable-framework-charts/components/barChart.js"