Truffle error visual studio code

[Truffle: Execute command] npm
[Truffle: Execute command]
[Truffle: Execute command] ERR! A complete log of this run can be found in:
npm ERR! /home/dario/.npm/_logs/2023-03-12T21_33_53_170Z-debug-0.log
[Truffle: Execute command] Finished running command
[Truffle: Requirements] Failed to run command - npm i -g truffle@">=5.0.0 <6.0.0". More details in output
[Truffle: Execute command] /bin/sh: line 1: truffle: command not found

Hi, I see you are trying to install truffle globally, some options that have worked for other people are:

  • Update node and npm
  • Adding "C:\Users<user>\AppData\Roaming\npm" to your PATH environment variable

If none of those options work, please include the complete log at "/home/dario/.npm/_logs/2023-03-12T21_33_53_170Z-debug-0.log"