【发布时间】: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