'"node" version "14" doesn't match your global version "12" when running node 16 in WSL
I'm using node 16 inside WSL (somehow that's the only way firebase works w my pc)
anyways - I'm trying to use a top level await in my code and I get an error indicating the await's placement in addition to the following:
⚠ Your requested "node" version "14" doesn't match your global version "12". Using node@12 from host.
I've used n as a version manager inside WSL and NVM for my windows 10 system. Both version 16.
I tried two solutions:
sudo n use 14
sudo n use 16
sadly - nothing happened. I've updated the version every time in the packgage.json and yet - nothing.
I think it's important to note that I'm using Firebase functions - it can probably indicate another issue
thanks in advance!!!
Solution 1:[1]
Most likely you have a problem with Firbase-tools. When installing Firbase-tools via the binary, it is installed with version 12 of Node.
I solved the problem by reinstalling Firbase-tools via npm.
npm install -g firebase-tools
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | егор нечаев |
