我已经安装了Code Runner,并且在Executer Map上进行了以下设置
{
"explorer.confirmDelete": false,
"[html]": {
"editor.defaultFormatter": "vscode.html-language-features"
},
"[javascript]": {
"editor.defaultFormatter": "vscode.typescript-language-features"
},
"liveServer.settings.donotShowInfoMsg": true,
"window.zoomLevel": 0,
"code-runner.executorMap": {
"javascript": "/home/pabc/.nvm/versions/node/v13.13.0/bin/node",
"php": "C:\\php\\php.exe",
"python": "python",
"perl": "perl",
"ruby": "C:\\Ruby23-x64\\bin\\ruby.exe",
"go": "go run",
"html": "\"C:\\Program Files (x86)\\Google\\Chrome\\Application\\chrome.exe\"",
"java": "cd $dir && javac $fileName && java $fileNameWithoutExt",
"c": "cd $dir && gcc $fileName -o $fileNameWithoutExt && $dir$fileNameWithoutExt"
}
}运行Console.log(10)时,输出如下所示
[Running] /home/pabc/.nvm/versions/node/v13.13.0/bin/node "/home/pabc/CODE_PROJECTS/Odin_Project/randomCode/test.js"
[Done] exited with code=0 in 0.025 seconds为了得到一些输出,我还需要验证什么吗?
发布于 2021-01-15 09:29:27
我也有同样的问题,因为我从Ubuntu商店安装了Nodejs,而不是终端。我解决了从终端重新安装Node的问题。使用本教程https://www.google.com/amp/s/www.digitalocean.com/community/tutorials/how-to-install-node-js-on-ubuntu-20-04-es.amp
https://stackoverflow.com/questions/61303363
复制相似问题