我是Yeoman和Node JS的新手。我试图按照http://yeoman.io/codelab/scaffold-app.html上的教程
我在步骤3中遇到意外错误,在按照步骤3中的选项运行yo
之后,出现错误:
npm ERR! code 1
npm ERR! Command failed: /Users/shaunrong/anaconda3/envs/NodeJS/bin/git checkout 4ed9a4a3275559c73a396eff7e1fde3824951ebb
npm ERR! error: Your local changes to the following files would be overwritten by checkout:
npm ERR! docs/why-use-pump/pipe-error.png
npm ERR! docs/why-use-pump/pump-error.png
npm ERR! Please commit your changes or stash them before you switch branches.
npm ERR! Aborting
npm ERR!
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/shaunrong/.npm/_logs/2018-01-01T06_05_39_887Z-debug.log
Initialized empty Git repository in /Users/shaunrong/Documents/PhD_Course/NodeJS/yo/.git/
这似乎与gulp有关,但我无法弄清楚如何解决它。我在conda虚拟环境中使用NodeJS和npm。
你的版本是2.0.0 npm版本是5.4.2节点版本是v8.8.1
请帮忙。谢谢。
似乎这是gulp的上游问题,我们遇到了同样的麻烦。现在应该通过这个提交修复:https://github.com/gulpjs/gulp/commit/a010db615fae4fbf8ecfdaff5530a4d84107d984
我有同样的问题。如果您有任何弃用,请查找此错误。我找到了这个:deprecated [email protected]: ...psst! Your project can stop working at any moment because its dependencies can change. Prevent this by migrating to Yarn: https://bower.io/blog/2017/how-to-migrate-away-from-bower/
,我认为这是问题所在。祝好运。