Open nickshanks347 opened 2 weeks ago
The same thing actually happens with the root user too, I have to run sudo -i
and then yarn/npm starts working. Why is this?
devcontainer.json:
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
// README at: https://github.com/devcontainers/templates/tree/main/src/typescript-node
{
"name": "Node.js & TypeScript",
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
"image": "mcr.microsoft.com/devcontainers/base:ubuntu",
// Features to add to the dev container. More info: https://containers.dev/features.
"features": {
"ghcr.io/devcontainers/features/node:1": {
"version": "lts",
"installYarnUsingApt": true
}
},
// Use 'forwardPorts' to make a list of ports inside the container available locally.
// "forwardPorts": [],
// Use 'postCreateCommand' to run commands after the container is created.
"postCreateCommand": "yarn config set --home enableTelemetry 0 && yarn install",
// Configure tool-specific properties.
"customizations": {
"vscode": {
"extensions": [
"esbenp.prettier-vscode",
"dbaeumer.vscode-eslint",
"arcanis.vscode-zipfs",
"dsznajder.es7-react-js-snippets"
]
}
},
// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
"remoteUser": "root"
}
@prathameshzarkar9 @gauravsaini04 Can you help debug this? thanks!
I tried the
mcr.microsoft.com/devcontainers/typescript-node
containers:20
&:22
. When trying to runnpm
with the default node user, I get this error:I am using a devcontainer.json with just
"image": "mcr.microsoft.com/devcontainers/typescript-node:22"
defined.