【问题标题】:Error in Yoeman with generator-fountain-webapp使用 generator-fountain-webapp 在 Yoeman 中出错
【发布时间】:2018-01-01 06:13:09
【问题描述】:

我是 Yoeman 和 NodeJS 的新手。我试图按照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

请帮忙。谢谢。

【问题讨论】:

  • 这两个文件好像改了。做一个git reset --hard
  • 没有帮助。

标签: node.js gulp yeoman-generator yo


【解决方案1】:

似乎这是 gulp 的上游问题,我们遇到了同样的麻烦。现在应该通过这个提交修复:https://github.com/gulpjs/gulp/commit/a010db615fae4fbf8ecfdaff5530a4d84107d984

【讨论】:

    【解决方案2】:

    我也遇到了同样的问题。如果您有任何已弃用,请查找此错误。 我找到了这个:deprecated bower@1.8.2: ...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/ 我认为这就是问题所在。 祝你好运。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2014-12-26
      • 2014-08-11
      • 1970-01-01
      • 2014-03-16
      • 1970-01-01
      • 1970-01-01
      • 2013-05-13
      • 1970-01-01
      相关资源
      最近更新 更多