我开始开发 VS Code,遵循指南让我到了无法在不升级 node.js 版本的情况下继续使用 Codespaces 的地步。
我在 https://github.com/microsoft/vscode/wiki/How-to-Contribute#build所以我尝试运行 yarn
并且我明白了。
@p4nu ➜ /workspaces/vscode $ yarn
yarn install v1.22.19
$ node build/npm/preinstall.js
*** Please use node.js versions >=16.14.x and <17.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
@p4nu ➜ /workspaces/vscode $ node -v
v14.19.3
我在这里使用标签 [visual-studio-code]
、[codespaces]
和 [node.js]
搜索了任何可用的答案> 但我什么也没找到。
最佳答案
在寻找答案后我偶然发现了 this documentation step .
我尝试添加一个新的配置文件,但我注意到(并不奇怪)这是 already made in this project .它获取引用 node.js 版本 14 的开发容器镜像。
可以更新 devcontainer.json
文件中的 node.js 版本,但对于这个 repo,我认为这是不可能的。我将在我的情况下在本地进行设置。
编辑:我已经在另一个仓库中更新了 nodejs here这允许在 Codespaces 中使用更新的 node.js。
关于node.js - 是否有可能在 Github Codespaces 中更新 node.js?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/72437602/