-1

I'm new to Linux and I'm trying to install yarn on my machine but I'm getting an error when I try to execute yarn.

Error:

fs/promises is not installed 

Anyone can help check the error code below thank you.

Error img

I tried installing Promises in global but it didn't work, also uninstalled corepack and yarn and reinstalled back again.

jonrsharpe
  • 115,751
  • 26
  • 228
  • 437
  • `fs/promises` is supported since nodejs v10. What version of nodejs do you have installed? Typically you should not install nodejs from the OS-package repository because depending on the distribution they may be quite old. – derpirscher Jan 15 '23 at 12:08
  • Please [don’t post images of code, error messages, or other textual data.](https://meta.stackoverflow.com/questions/285551/why-not-upload-images-of-code-on-so-when-asking-a-question/285557#285557) – tripleee Jan 15 '23 at 16:33

1 Answers1

-1

Thank you guys but i think i fixed by forcing an instalation of the latest nodejs

  • Instead of forcing an install of node globally on your machine, try using Node Version Manager (https://github.com/nvm-sh/nvm) which allows you to run multiple versions of Node on the same machine in sandbox environments. – AppSol Jan 24 '23 at 10:34