这是indexloc提供的服务,不要输入任何密码
Skip to content

fix(deps): upgrading node for devcontainer #1308

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

Closed
wants to merge 1 commit into from

Conversation

makrsmark
Copy link

Node 16 is deprecated. pnpm requires 18
Also updating .gitignore when using devcontainer

Node 16 is deprecated. pnpm requires 18
Also updating .gitignore when using devcontainer
Copy link

codesandbox bot commented Feb 24, 2025

Review or Edit in CodeSandbox

Open the branch in Web EditorVS CodeInsiders

Open Preview

Copy link

vercel bot commented Feb 24, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
tsup ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 24, 2025 2:05pm

@neilenns
Copy link

I hit this as well, logged #1335.

Since the devcontainer file was originally created 3 years ago, the spec for containers has advanced considerably and there's no longer a need to have a custom Dockerfile just to get pnpm installed. The devcontainer features feature (ha!) can be used instead.

Also, the structure of devcontainer files has changed, and things should be grouped under the new customizations property.

{
  "name": "Node.js",
 
  "image": "mcr.microsoft.com/devcontainers/javascript-node:18-bullseye",

  "customizations": {
    // Set *default* container specific settings.json values on container create.
    "settings": {},

    // Add the IDs of extensions you want installed when the container is created.
    "extensions": ["dbaeumer.vscode-eslint"],

    "features": {
      "ghcr.io/devcontainers-extra/features/pnpm:2": {}
    }
  },

  // 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": "pnpm install",

  // Comment out to connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root.
  "remoteUser": "node"
}

I was just about to open a PR for this when I saw your PR. Maybe you can update yours instead?

@makrsmark
Copy link
Author

Feel free to put up a better PR, I have no problem closing this one.

@neilenns
Copy link

#1336

@makrsmark makrsmark closed this Apr 29, 2025
@makrsmark
Copy link
Author

Closed in favor of #1336

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

Successfully merging this pull request may close these issues.

2 participants