Data loader Build is failing - Output files in dist not generated.

Hi Team,

I am using observablehq version 1.7.0
node version 20.5.0
and when I run npm run build I am getting the below error.

build node_modules/observablehq/framework/dist/client/index.js → npm:lodash → npm:arquero → npm:apache-arrow → npm:d3 → npm: echarts → npm:htl → npm: leaflet → npm: mapbox-gl → npm :@observableplot → npm:d3-dsv → TypeError: Fetch Failed.

at asyc node_modules/observablehq/framework/dist/npm.js:194:22

cause: Error Client network socket disconnected before secure TLS connection established.

code: 'ECONNREST",
path: undefined,
host: ‘’,
port: 443,
localAddress: null,

the exact same setup works with node 20.5.0 on personal system but not working on corporate device.

It is a simple "Hello World " data loader which should generate output file in dist folder with string as hello world.

any help would be appreciated.

Your company’s firewall (or the device configuration) might be getting in the way.

Are you able to curl one of the routes from the shell? For example

curl -iN ''

If you have a (non-company) VPN available I would also try connecting through that.

1 Like

Yes, this is likely a firewall issue.

Observable Framework does not yet support the HTTP_PROXY environment variable that is commonly used in conjunction with firewalls, but there is a workaround described here:

1 Like

@mootari thanks a lot for the quick response.
will try this approach.

@mbostock Thanks a lot for the quick response.
This a definitely a proxy issue, will have to use your approach using undici.

I have one question here, Obseravblehq framework is trying to access some of the internal dependency packages from INTERNET, but our corporate device have there own repositories from where all the packages are getting downloaded in that case how come other package’s are not getting affected by firewall and why we have to handle this separately?

Or if my understanding is incorrect it would be helpful if you could explain in simple terms the root cause as I am new to the industry,

@mootari by any chance do you have any idea on my above question?

Also ind documentation its written as we can use curl to fetch data and store in such case when should we use observable framework data loaders and when the curl approach?

What are the pros and cons of the two methods?