3

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!!!

Itay Haim
  • 69
  • 3
  • this answer solved it for me https://stackoverflow.com/questions/60315185/firebase-shell-still-reads-my-node-version-12-instead-of-the-nvm-version – Anton Mar 21 '22 at 15:23

1 Answers1

3

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