Skip to content
This repository has been archived by the owner on Nov 30, 2023. It is now read-only.

ENOENT: no such file or directory #1751

Open
4ydan opened this issue Jun 30, 2023 · 4 comments
Open

ENOENT: no such file or directory #1751

4ydan opened this issue Jun 30, 2023 · 4 comments

Comments

@4ydan
Copy link

4ydan commented Jun 30, 2023

After playing around with container volumes and cloning pull requests into container volumes, my docker build crashed with this error:

ENOENT: no such file or directory, lstat no such file /root/.vscode-dev-container' .... node_modules/vscode-dev-containers/container-features'

Sorry I dont have the whole log output anymore, the path is reconstructed from my memory. And I cant reproduce the error anymore after I found this post. So I switched my version from 0.295.0 to 0.292.0 and back to 0.295.0 and I cant reproduce the error anymore but I thought it maybe helps to report this.

Edit: I managed to reproduce it: log.txt

Error: ENOENT: no such file or directory, lstat '/root/.vscode-remote-containers/dist/dev-containers-cli-0.295.0/dist/node_modules/vscode-dev-containers/container-features'

going back one version fixes it again.

  • VSCode Version: 1.79.2 (user setup)
  • Local OS Version: Windows 10
  • Local chip architecture: x86
  • Reproduces in: Remote - Containers
  • Name of Dev Container Definition with Issue: Any devcontainer from the templates, most of the times the Rust one.

Steps to Reproduce:

  1. Dev Containers: Clone [Repository/Github Pull Request] in [Named] Container Volume (any of the three options)
  2. Container crashes with the above Error

I tried resetting my wsl ubuntu, reinstalling vscode and the extension, deleting all volumes, deleting my docker build cache nothing worked.

It seems to be something with the devcontainer.json feature installations.

@simonschmidt
Copy link

simonschmidt commented Jul 20, 2023

Same here:
EDIT: Wiping .vscode sorted it out for me

OS: Fedora 38
vscode: 1.80.1
dev containers extension: v0.299.0 (pre-release, but same thing with normal version)
image: "mcr.microsoft.com/vscode/devcontainers/python:3.11"

Happens with both podman and docker

Started happening after reinstalling my OS, not sure if that's related, I preserved my home directory.

[708 ms] Start: Run: git rev-parse --show-cdup
[756 ms] Start: Run: docker ps -q -a --filter label=devcontainer.local_folder=/home/simon/projects/my_project --filter label=devcontainer.config_file=/home/simon/projects/my_project/.devcontainer/devcontainer.json
[774 ms] Start: Run: docker inspect --type image mcr.microsoft.com/vscode/devcontainers/python:3.11
[1485 ms] local container features stored at: /home/simon/.vscode/extensions/ms-vscode-remote.remote-containers-0.299.0/dist/node_modules/vscode-dev-containers/container-features
[1487 ms] Start: Run: tar --no-same-owner -x -f -
[1492 ms] Error: ENOENT: no such file or directory, lstat '/home/simon/.vscode/extensions/ms-vscode-remote.remote-containers-0.299.0/dist/node_modules/vscode-dev-containers/container-features'
[1498 ms] Exit code 1
[1500 ms] Command failed: /usr/share/code/code --ms-enable-electron-run-as-node /home/simon/.vscode/extensions/ms-vscode-remote.remote-containers-0.299.0/dist/spec-node/devContainersSpecCLI.js up --user-data-folder /home/simon/.config/Code/User/globalStorage/ms-vscode-remote.remote-containers/data --container-session-data-folder /tmp/devcontainers-9577c0dd-fc1d-4cbc-a731-0cd266d263091689855298557 --workspace-folder /home/simon/projects/my_project --workspace-mount-consistency cached --id-label devcontainer.local_folder=/home/simon/projects/my_project --id-label devcontainer.config_file=/home/simon/projects/my_project/.devcontainer/devcontainer.json --log-level debug --log-format json --config /home/simon/projects/my_project/.devcontainer/devcontainer.json --default-user-env-probe loginInteractiveShell --mount type=volume,source=vscode,target=/vscode,external=true --mount type=bind,source=/run/user/1000/wayland-0,target=/tmp/vscode-wayland-6d0b8277-767a-4

.devcontainer.json:

{
	"name": "job_chat_prompts",
	"image": "mcr.microsoft.com/vscode/devcontainers/python:3.11",
	"customizations": {
		"vscode": {
			"settings": {
				"[python]": {
					"editor.formatOnSave": true,
					"editor.codeActionsOnSave": {
						"source.fixAll": true
					}
				},
				"python.formatting.provider": "black"
			},
			"extensions": [
				"streetsidesoftware.code-spell-checker",
				"charliermarsh.ruff"
			]
		}
	},
	"postCreateCommand": "pip install -e .",
	"remoteUser": "root"
}

EDIT: Most likely my issue was that my backup scripts exclude all node_modules direcotries, I guess re-installing the plugin wasn't sufficient to wipe it enough for the node_modules to be recreated

@TheDeveloper
Copy link

I am experiencing this on WSL2 with v0.304.0 of Dev Containers extension.

Rolling back to v0.299.0 fixed it.

Here is the Dev Containers log:

[6851 ms] @devcontainers/cli 0.50.0. Node.js v16.20.1. linux 5.15.90.1-microsoft-standard-WSL2 x64.
[6851 ms] Start: Run: docker buildx version
[6917 ms] github.com/docker/buildx v0.8.2 6224def4dd2c3d347eee19db595348c50d7cb491
[6917 ms] 
[6917 ms] Start: Resolving Remote
[6920 ms] Start: Run: git rev-parse --show-cdup
[7032 ms] Start: Run: docker ps -q -a --filter label=vsch.local.repository=https://github.com/Microsoft/vscode-remote-try-node --filter label=vsch.local.repository.volume=vscode-remote-try-node-d773fe6db837e4b027e5be39a8a66cbe8f69ed4273833eb196b87fd108a6439a --filter label=vsch.local.repository.folder=vscode-remote-try-node --filter label=devcontainer.config_file=/workspaces/vscode-remote-try-node/.devcontainer/devcontainer.json
[7053 ms] Start: Run: docker inspect --type image mcr.microsoft.com/devcontainers/javascript-node:0-18-bullseye
[7076 ms] local container features stored at: /root/.vscode-remote-containers/dist/dev-containers-cli-0.304.0/dist/node_modules/vscode-dev-containers/container-features
[7077 ms] Start: Run: tar --no-same-owner -x -f -
[7082 ms] Error: ENOENT: no such file or directory, lstat '/root/.vscode-remote-containers/dist/dev-containers-cli-0.304.0/dist/node_modules/vscode-dev-containers/container-features'
[7115 ms] Exit code 1
[7116 ms] Start: Run: docker rm -f 3ea7e4c98fc64f162ca39c3e2c0da410addda2e2a2dee23b9d9927d2b6c7746b
[7118 ms] Command failed: node /root/.vscode-remote-containers/dist/dev-containers-cli-0.304.0/dist/spec-node/devContainersSpecCLI.js up --container-session-data-folder /tmp/devcontainers-b55c74d8-4c9e-4fe3-8a42-c775fd34e3111692031697598 --workspace-folder /workspaces/vscode-remote-try-node --workspace-mount-consistency cached --id-label vsch.local.repository=https://github.com/Microsoft/vscode-remote-try-node --id-label vsch.local.repository.volume=vscode-remote-try-node-d773fe6db837e4b027e5be39a8a66cbe8f69ed4273833eb196b87fd108a6439a --id-label vsch.local.repository.folder=vscode-remote-try-node --id-label devcontainer.config_file=/workspaces/vscode-remote-try-node/.devcontainer/devcontainer.json --log-level debug --log-format json --config /workspaces/vscode-remote-try-node/.devcontainer/devcontainer.json --override-config /tmp/devcontainer-4dc7872b-a372-41d0-88e0-6d3c3f34184d.json --default-user-env-probe loginInteractiveShell --mount type=volume,source=vscode-remote-try-node-d773fe6db837e4b027e5be39a8a66cbe8f69ed4273833eb196b87fd108a6439a,target=/workspaces,external=true --mount type=volume,source=vscode,target=/vscode,external=true --mount type=bind,source=\\wsl.localhost\Ubuntu\run\user\1000\wayland-0,target=/tmp/vscode-wayland-876304bd-51c6-498f-97f0-934725ded289.sock --skip-post-create --update-remote-user-uid-default off --mount-workspace-git-root true --terminal-columns 146 --terminal-rows 12
[7119 ms] Exit code 1
[7268 ms] Container server terminated (code: 137, signal: null).

@kiweezi
Copy link

kiweezi commented Aug 30, 2023

I'm having an identical issue. The suggestion by @TheDeveloper to roll back to v0.299.0 worked for me too.

@juniorbotelho
Copy link

@TheDeveloper Nice suggestion, this worked for me too XD.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants