Skip to content

failed to build with error: bash: "/usr/local/share/nvm/nvm.sh: No such file or directory" #1078

Description

@SouthWest7

When I try to open the folder in devcontainer, feature "Node.js (via nvm), yarn and pnpm" (ghcr.io/devcontainers/features/node) failed to install!
logs follows:

[+] Building 442.3s (17/18)                                                                    docker:desktop-linux
 => [internal] load build definition from Dockerfile.extended                                                  0.0s
 => => transferring dockerfile: 4.80kB                                                                         0.0s
 => resolve image config for docker-image://docker.io/docker/dockerfile:1.4                                    2.6s
 => [auth] docker/dockerfile:pull token for registry-1.docker.io                                               0.0s
 => CACHED docker-image://docker.io/docker/dockerfile:1.4@sha256:9ba7531bd80fb0a858632727cf7a112fbfd19b17e94c  0.0s
 => [internal] load .dockerignore                                                                              0.0s
 => => transferring context: 2B                                                                                0.0s
 => [context dev_containers_feature_content_source] load .dockerignore                                         0.0s
 => => transferring dev_containers_feature_content_source: 2B                                                  0.0s
 => [internal] load metadata for mcr.microsoft.com/vscode/devcontainers/base:ubuntu                            0.0s
 => [context dev_containers_feature_content_source] load from client                                           0.1s
 => => transferring dev_containers_feature_content_source: 170.74kB                                            0.0s
 => CACHED [dev_containers_feature_content_normalize 1/3] FROM mcr.microsoft.com/vscode/devcontainers/base:ub  0.0s
 => [dev_containers_feature_content_normalize 2/3] COPY --from=dev_containers_feature_content_source devconta  0.0s
 => [dev_containers_feature_content_normalize 3/3] RUN chmod -R 0755 /tmp/build-features/                      0.3s
 => CACHED [dev_containers_target_stage 2/8] RUN mkdir -p /tmp/dev-container-features                          0.0s
 => CACHED [dev_containers_target_stage 3/8] COPY --from=dev_containers_feature_content_normalize /tmp/build-  0.0s
 => CACHED [dev_containers_target_stage 4/8] RUN echo "_CONTAINER_USER_HOME=$( (command -v getent >/dev/null   0.0s
 => [dev_containers_target_stage 5/8] RUN --mount=type=bind,from=dev_containers_feature_content_source,sour  298.0s
 => [dev_containers_target_stage 6/8] RUN --mount=type=bind,from=dev_containers_feature_content_source,sour  138.8s
 => ERROR [dev_containers_target_stage 7/8] RUN --mount=type=bind,from=dev_containers_feature_content_source,  2.2s
------
 > [dev_containers_target_stage 7/8] RUN --mount=type=bind,from=dev_containers_feature_content_source,source=node_2,
target=/tmp/build-features-src/node_2     cp -ar /tmp/build-features-src/node_2 /tmp/dev-container-features  && chmo
d -R 0755 /tmp/dev-container-features/node_2  && cd /tmp/dev-container-features/node_2  && chmod +x ./devcontainer-f
eatures-install.sh  && ./devcontainer-features-install.sh  && rm -rf /tmp/dev-container-features/node_2:
0.472 ===========================================================================
0.472 Feature       : Node.js (via nvm), yarn and pnpm
0.472 Description   : Installs Node.js, nvm, yarn, pnpm, and needed dependencies.
0.472 Id            : ghcr.io/devcontainers/features/node
0.472 Version       : 1.5.0
0.472 Documentation : https://github.com/devcontainers/features/tree/main/src/node
0.472 Options       :
0.472     VERSION="20"
0.472     NODEGYPDEPENDENCIES="true"
0.472     NVMINSTALLPATH="/usr/local/share/nvm"
0.472     NVMVERSION="latest"
0.472     INSTALLYARNUSINGAPT="true"
0.472 ===========================================================================
1.585 NVM_VERSION=0.40.0
2.150 bash: line 10: /usr/local/share/nvm/nvm.sh: No such file or directory
2.152 ERROR: Feature "Node.js (via nvm), yarn and pnpm" (ghcr.io/devcontainers/features/node) failed to install! Loo
k at the documentation at https://github.com/devcontainers/features/tree/main/src/node for help troubleshooting this
 error.
------
Dockerfile.extended:46
--------------------
  45 |     ENV PATH="/usr/local/share/nvm/current/bin:${PATH}"
  46 | >>> RUN --mount=type=bind,from=dev_containers_feature_content_source,source=node_2,target=/tmp/build-features
-src/node_2 \
  47 | >>>     cp -ar /tmp/build-features-src/node_2 /tmp/dev-container-features \
  48 | >>>  && chmod -R 0755 /tmp/dev-container-features/node_2 \
  49 | >>>  && cd /tmp/dev-container-features/node_2 \
  50 | >>>  && chmod +x ./devcontainer-features-install.sh \
  51 | >>>  && ./devcontainer-features-install.sh \
  52 | >>>  && rm -rf /tmp/dev-container-features/node_2
  53 |
--------------------
ERROR: failed to solve: process "/bin/sh -c cp -ar /tmp/build-features-src/node_2 /tmp/dev-container-features  && ch
mod -R 0755 /tmp/dev-container-features/node_2  && cd /tmp/dev-container-features/node_2  && chmod +x ./devcontainer
-features-install.sh  && ./devcontainer-features-install.sh  && rm -rf /tmp/dev-container-features/node_2" did not c
omplete successfully: exit code: 1

View build details: docker-desktop://dashboard/build/desktop-linux/desktop-linux/x34a9w99lqcaz2fh5ns6zxol8
[470324 ms] Error: Command failed: docker buildx build --load --build-context dev_containers_feature_content_source=C:\Users\lenovo\AppData\Local\Temp\devcontainercli\container-features\0.65.0-1722871649534 --build-arg _DEV_CONTAINERS_BASE_IMAGE=mcr.microsoft.com/vscode/devcontainers/base:ubuntu --build-arg _DEV_CONTAINERS_IMAGE_USER=root --build-arg _DEV_CONTAINERS_FEATURE_CONTENT_SOURCE=dev_container_feature_content_temp --target dev_containers_target_stage -f C:\Users\lenovo\AppData\Local\Temp\devcontainercli\container-features\0.65.0-1722871649534\Dockerfile.extended -t vsc-argo-workflows-8d0ca60f7a31f10ab8c56cae166822b509389b6a37d922f75931f6dcee78ad0b-features c:\Users\lenovo\AppData\Roaming\Code\User\globalStorage\ms-vscode-remote.remote-containers\data\empty-folder
[470324 ms]     at ptA (c:\Users\lenovo\.vscode\extensions\ms-vscode-remote.remote-containers-0.380.0\dist\spec-node\devContainersSpecCLI.js:465:1260)
[470324 ms]     at NH (c:\Users\lenovo\.vscode\extensions\ms-vscode-remote.remote-containers-0.380.0\dist\spec-node\devContainersSpecCLI.js:465:1002)
[470325 ms]     at async KtA (c:\Users\lenovo\.vscode\extensions\ms-vscode-remote.remote-containers-0.380.0\dist\spec-node\devContainersSpecCLI.js:482:3771)
[470325 ms]     at async eB (c:\Users\lenovo\.vscode\extensions\ms-vscode-remote.remote-containers-0.380.0\dist\spec-node\devContainersSpecCLI.js:482:4886)
[470325 ms]     at async hrA (c:\Users\lenovo\.vscode\extensions\ms-vscode-remote.remote-containers-0.380.0\dist\spec-node\devContainersSpecCLI.js:663:200)
[470325 ms]     at async lrA (c:\Users\lenovo\.vscode\extensions\ms-vscode-remote.remote-containers-0.380.0\dist\spec-node\devContainersSpecCLI.js:662:13452)
[470340 ms] Exit code 1
[470371 ms] Command failed: C:\Users\lenovo\AppData\Local\Programs\Microsoft VS Code\Code.exe c:\Users\lenovo\.vscode\extensions\ms-vscode-remote.remote-containers-0.380.0\dist\spec-node\devContainersSpecCLI.js up --user-data-folder c:\Users\lenovo\AppData\Roaming\Code\User\globalStorage\ms-vscode-remote.remote-containers\data --container-session-data-folder /tmp/devcontainers-2f2be18d-f101-48cd-81f5-da56c87dd95f1722871642032 --workspace-folder c:\Users\lenovo\Desktop\argo\argo-workflows --workspace-mount-consistency cached --id-label devcontainer.local_folder=c:\Users\lenovo\Desktop\argo\argo-workflows --id-label devcontainer.config_file=c:\Users\lenovo\Desktop\argo\argo-workflows\.devcontainer\devcontainer.json --log-level debug --log-format json --config c:\Users\lenovo\Desktop\argo\argo-workflows\.devcontainer\devcontainer.json --default-user-env-probe loginInteractiveShell --mount type=volume,source=vscode,target=/vscode,external=true --mount type=bind,source=\\wsl.localhost\Ubuntu\mnt\wslg\runtime-dir\wayland-0,target=/tmp/vscode-wayland-4a4e9504-bf15-495e-86b2-dd6be4efbe37.sock --skip-post-create --update-remote-user-uid-default on --mount-workspace-git-root --terminal-columns 116 --terminal-rows 13 --include-configuration --include-merged-configuration
[470372 ms] Exit code 1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions