Skip to content

Commit bdc4df9

Browse files
authored
[RECIPE] npm/yarn to use ipv4first node option.
1 parent 0ab7199 commit bdc4df9

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

user/common-build-problems.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -630,3 +630,13 @@ This creates only one job, _Peanut Butter and Bread_ under the stage named _Bre
630630
## **Node**: Script execution before dependency installation causes build failures
631631

632632
When adding custom setup instructions to a NodeJS build, add them in the `before_script` phase and not before _dependencies are installed_. The `before_script` phase is the safest place to add custom setup scripts. Symptoms of this problem include previously succeeding builds suddenly failing due to the addition of a new dependency.
633+
634+
## **Node**: NPM/YARN throw ***Error: connect ENETUNREACH*** or build hangs in the install phase i.e. `npm install` or `yarn install` for NodeJs versions 16+ on LXD images (ppc64le, arm64 and s390x)
635+
636+
This seems to be a known bug and the details can be reviewed at https://github.com/npm/cli/issues/4163. Add the following to resolve the issue:
637+
638+
``` yaml
639+
env:
640+
global:
641+
- NODE_OPTIONS="--dns-result-order=ipv4first"
642+
```

0 commit comments

Comments
 (0)