Closed kedevked closed 2 years ago
We pick the node version from the PATH
environment variable, so mostly likely vscode is not picking it up correctly or you rely on nvm etc. I recommend to check the PATH env var when vscode gets launched. I see you are using WSL, maybe you have it only installed it inside WSL but not on the host?
I am using nvm. Since I do have the file .nvmrc in my repo, nvm update the node version to be 18 whenever I cd to the repo. However, the extension still picks the default version which is the 14 I guess. As a matter of fact when I run node --version within the path of the repo, it is 18
By default NVM does not automatically activate the version configured inside the .nvmrc file. You need to manually "use it" by doing "nvm use".
How does VSCode pick it up in your scenario? Since either you modified the nvm auto-load config inside bashrc or you do manual "nvm use".
Can the playwright extension be reloaded to respect the current version of node rather than the path version when opening the project? Some of our developers open the project directly in VsCode and so there is no opportunity to "use" the project version before the extension is initialized. @mxschmitt
Why is this closed, this should be open @kedevked
Context:
npm init playwright@latest
with no additonal typescript configCode Snippet
Describe the bug
when I run the command
npx playwright test
my test passes because I am using node 18 that hasfetch
. But when I use the extension to run the spec it fails complaining thatfetch
is not defined