简体   繁体   English

npm 和 Visual Studio Code 中的 yarn 安装错误

[英]npm and yarn installation error in Visual Studio Code

I've been trying to run a server development in Visual Studio Code for this but I keep getting an error为此,我一直在尝试在 Visual Studio Code 中运行服务器开发,但我一直收到错误消息

https://github.com/cobiwave/gatsby-simplefolio#readme https://github.com/cobiwave/gatsby-simplefolio#readme

I already have all the Prerequisites but I am stuck at我已经具备所有先决条件,但我被困在

Then you can install the dependencies either using NPM or Yarn:然后您可以使用 NPM 或 Yarn 安装依赖项:

When I try npm install I keep getting an error that starts with this当我尝试npm install时,我不断收到以此开头的错误

npm ERR! code 1
npm ERR! path D:\gatsby-simplefolio\node_modules\node-sass
npm ERR! command failed

I also did the npm install --unsafe-perm=true --allow-root and same thing happened我也做了npm install --unsafe-perm=true --allow-root并且发生了同样的事情

When I try yarn I keep getting this error当我尝试yarn时,我不断收到此错误

yarn : File D:\nodejs\yarn.ps1 cannot be loaded. The file D:\nodejs\yarn.ps1 is not digitally signed. You  
cannot run this script on the current system. For more information about running scripts and setting       
execution policy, see about_Execution_Policies at https:/go.microsoft.com/fwlink/?LinkID=135170.

Hello thanks for answering.您好感谢您的回答。 I already solved it.我已经解决了。 Turns out the project is outdated.原来这个项目已经过时了。 I checked out the owner and found this updated version and used it.我检查了所有者并找到了这个更新版本并使用了它。

https://github.com/cobiwave/simplefolio https://github.com/cobiwave/simplefolio

npm start worked for me. npm start为我工作。 yarn still doesn't work but that's another problem for another day yarn仍然不起作用,但那是另一天的另一个问题

Try using node 13.14.0.尝试使用节点 13.14.0。 I also ran got a node-sass related error when I tried to do npm install with this repo and I found this issue .当我尝试使用此 repo 进行npm install时,我也遇到了与 node-sass 相关的错误,我发现了这个问题 Once I downgraded to that lower version I was able to install.一旦我降级到那个较低的版本,我就可以安装了。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM