Skip to content

Commit

Permalink
Use verdaccio on 127.0.0.1 instead of localhost to avoid ipv6 (#7491)
Browse files Browse the repository at this point in the history
Fix an intermittent bug in the npm publishing script that causes the script to depend on the network configuration of the host. I think what's happening is that when ipv6 is available, sometimes Verdaccio binds [::1]:5783 instead of 127.0.0.1:5783, but npm tries to publish to 127.0.0.1:5783. Explicitly specifying the loopback address 127.0.0.1 fixes this.
  • Loading branch information
mattsoulanille committed Mar 20, 2023
1 parent e80b24f commit 8e0b81a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions e2e/scripts/verdaccio.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,6 @@ packages:
# Log settings.
logs:
- {type: stdout, format: pretty, level: http}

listen:
- 127.0.0.1:4873
2 changes: 1 addition & 1 deletion scripts/publish-npm.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ import * as child_process from 'child_process';
import {BAZEL_PACKAGES} from './bazel_packages';

const TMP_DIR = '/tmp/tfjs-publish';
const VERDACCIO_REGISTRY = 'http://localhost:4873';
const VERDACCIO_REGISTRY = 'http://127.0.0.1:4873';
const NPM_REGISTRY = 'https://registry.npmjs.org/';

// This script can not publish the tfjs website
Expand Down

0 comments on commit 8e0b81a

Please sign in to comment.