Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Basic node js container template fails #9126

Open
lramos15 opened this issue Oct 24, 2023 · 3 comments
Open

Basic node js container template fails #9126

lramos15 opened this issue Oct 24, 2023 · 3 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug containers Issue in vscode-remote containers upstream Issue identified as 'upstream' component related (exists outside of VS Code Remote)

Comments

@lramos15
Copy link
Member

Testing #9123

-----
 > [dev_containers_target_stage 5/5] RUN --mount=type=bind,from=dev_containers_f
eature_content_source,source=node_0,target=/tmp/build-features-src/node_0     cp
 -ar /tmp/build-features-src/node_0 /tmp/dev-container-features  && chmod -R 075
5 /tmp/dev-container-features/node_0  && cd /tmp/dev-container-features/node_0
&& chmod +x ./devcontainer-features-install.sh  && ./devcontainer-features-insta
ll.sh  && rm -rf /tmp/dev-container-features/node_0:
0.756 ==========================================================================
=
0.756 Feature       : Node.js (via nvm), yarn and pnpm
0.756 Description   : Installs Node.js, nvm, yarn, pnpm, and needed dependencies
.
0.756 Id            : ghcr.io/devcontainers/features/node
0.756 Version       : 1.3.1
0.756 Documentation : https://github.com/devcontainers/features/tree/main/src/no
de
0.756 Options       :
0.756     VERSION="lts"
0.756     NODEGYPDEPENDENCIES="true"
0.756     NVMINSTALLPATH="/usr/local/share/nvm"
0.756     NVMVERSION="latest"
0.756 ==========================================================================
=
0.763 (!) Unsupported distribution version '' for Node 18. Details: https://gith
ub.com/nodejs/node/issues/42351#issuecomment-1068424442
0.763 ERROR: Feature "Node.js (via nvm), yarn and pnpm" (ghcr.io/devcontainers/f
eatures/node) failed to install! Look at the documentation at https://github.com
/devcontainers/features/tree/main/src/node for help troubleshooting this error.
------
Dockerfile.extended:26
--------------------
  25 |     ENV PATH="/usr/local/share/nvm/current/bin:${PATH}"
  26 | >>> RUN --mount=type=bind,from=dev_containers_feature_content_source,sour
ce=node_0,target=/tmp/build-features-src/node_0 \
  27 | >>>     cp -ar /tmp/build-features-src/node_0 /tmp/dev-container-features
 \
  28 | >>>  && chmod -R 0755 /tmp/dev-container-features/node_0 \
  29 | >>>  && cd /tmp/dev-container-features/node_0 \
  30 | >>>  && chmod +x ./devcontainer-features-install.sh \
  31 | >>>  && ./devcontainer-features-install.sh \
  32 | >>>  && rm -rf /tmp/dev-container-features/node_0
  33 |
--------------------
ERROR: failed to solve: process "/bin/sh -c cp -ar /tmp/build-features-src/node_
0 /tmp/dev-container-features  && chmod -R 0755 /tmp/dev-container-features/node
_0  && cd /tmp/dev-container-features/node_0  && chmod +x ./devcontainer-feature
s-install.sh  && ./devcontainer-features-install.sh  && rm -rf /tmp/dev-containe
r-features/node_0" did not complete successfully: exit code: 1
[23113 ms] Error: Command failed: docker buildx build --load --build-context dev_containers_feature_content_source=C:\Users\LOGANR~1\AppData\Local\Temp\devcontainercli\container-features\0.52.1-1698170725136 --build-arg _DEV_CONTAINERS_BASE_IMAGE=mcr.microsoft.com/devcontainers/base:alpine-3.18 --build-arg _DEV_CONTAINERS_IMAGE_USER=root --build-arg _DEV_CONTAINERS_FEATURE_CONTENT_SOURCE=dev_container_feature_content_temp --target dev_containers_target_stage -t vsc-dctest-68e4a38c10904a2ff0e2e6663572ef40300eda26a0995a945cde54f465e63341-features -f C:\Users\LOGANR~1\AppData\Local\Temp\devcontainercli\container-features\0.52.1-1698170725136\Dockerfile.extended C:\Users\LOGANR~1\AppData\Local\Temp\devcontainercli\empty-folder
[23114 ms]     at EAA (C:\Users\loganramos\.vscode-remote-containers\dist\dev-containers-cli-0.319.0\dist\spec-node\devContainersSpecCLI.js:462:1260)
[23114 ms]     at kK (C:\Users\loganramos\.vscode-remote-containers\dist\dev-containers-cli-0.319.0\dist\spec-node\devContainersSpecCLI.js:462:1002)
[23114 ms]     at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
[23114 ms]     at async NAA (C:\Users\loganramos\.vscode-remote-containers\dist\dev-containers-cli-0.319.0\dist\spec-node\devContainersSpecCLI.js:479:3660)
[23114 ms]     at async vC (C:\Users\loganramos\.vscode-remote-containers\dist\dev-containers-cli-0.319.0\dist\spec-node\devContainersSpecCLI.js:479:4775)
[23114 ms]     at async etA (C:\Users\loganramos\.vscode-remote-containers\dist\dev-containers-cli-0.319.0\dist\spec-node\devContainersSpecCLI.js:613:10941)
[23114 ms]     at async AtA (C:\Users\loganramos\.vscode-remote-containers\dist\dev-containers-cli-0.319.0\dist\spec-node\devContainersSpecCLI.js:613:10682)
[23125 ms] Exit code 1
[23128 ms] Command failed: C:\Users\loganramos\.vscode-insiders\cli\servers\Insiders-7dff07893ac160244db210e574eccc05f1cba2cb\server\node.exe C:\Users\loganramos\.vscode-remote-containers\dist\dev-containers-cli-0.319.0\dist\spec-node\devContainersSpecCLI.js up --container-session-data-folder /tmp/devcontainers-ace08ffa-af43-4c13-ab02-b796ba8b705e1698170711847 --workspace-folder c:\Users\loganramos\Downloads\dc test --workspace-mount-consistency cached --id-label devcontainer.local_folder=c:\Users\loganramos\Downloads\dc test --id-label devcontainer.config_file=c:\Users\loganramos\Downloads\dc test\.devcontainer\devcontainer.json --log-level debug --log-format json --config c:\Users\loganramos\Downloads\dc test\.devcontainer\devcontainer.json --default-user-env-probe loginInteractiveShell --mount type=volume,source=vscode,target=/vscode,external=true --skip-post-create --update-remote-user-uid-default on --mount-workspace-git-root
[23128 ms] Exit code 1

Attempting to create an alpine container with added nodejs via nvm feature.

@chrmarti
Copy link
Contributor

chrmarti commented Dec 7, 2023

I think there are no official Node.js builds for Alpine and nvm only installs from those.

@chrmarti chrmarti added bug Issue identified by VS Code Team member as probable bug containers Issue in vscode-remote containers upstream Issue identified as 'upstream' component related (exists outside of VS Code Remote) labels Dec 7, 2023
@lramos15
Copy link
Member Author

lramos15 commented Dec 7, 2023

Should the template be disabled from being chosen until a working build for that configuration is out?

@chrmarti
Copy link
Contributor

chrmarti commented Dec 8, 2023

I agree. We currently don't have a way for the template to specify which distro it is using and for the feature to indicate compatibility with distros. We are tracking this in devcontainers/spec#58.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue identified by VS Code Team member as probable bug containers Issue in vscode-remote containers upstream Issue identified as 'upstream' component related (exists outside of VS Code Remote)
Projects
None yet
Development

No branches or pull requests

2 participants