关闭vscode,再重新打开,就可以生效了。

参考: (https://stackoverflow.com/a/77081302)[nvm keeps “forgetting” node in new terminal session]