The Vscode terminal uses the npm command to install Koa2 and reports an error

foreword

In the vscode terminal, use the npm command to install koa, and report an error:
insert image description here

solve

  • From the error message, it is known that it is an error related to permissions, so turn off the vscode software;

  • Right click on the vscode icon - select properties - enter the compatibility panel - select "Run this program as an administrator"
    insert image description here

  • Re-enter the npm installation command in the vscode terminal, and the installation is successful:
    insert image description here

Guess you like

Origin blog.csdn.net/Junehhh/article/details/130382890