scrat-team / scrat

Webapp Modular Framework
http://scrat-team.github.io/
773 stars 147 forks source link

scrat init 执行报错 #22

Open xuhuan opened 9 years ago

xuhuan commented 9 years ago

在空目录下执行scrat init 后报错 error You don't seem to have a generator with the name scrat installed.

全局安装了 generator-scrat 后依旧无效。 重装过 scrat 依旧无效,带上 -c 参数后依旧无效。

执行 yo 后有 scrat 选项, image 但是选择后执行报错,提示fis不存在, image

fis之前就安装过且是最新版本。 image

scrat 也是最新版。 image

node路径确定是配置过的,其他的都在跑,不至于说这一个没有配置。

scrat 和 generator-scrat 安装在同一个目录。

系统win2003。 image node v0.12.0 npm v2.5.1

fouber commented 9 years ago

@xuhuan

不要独立安装 generator-scrat,删除掉之后,重新安装scrat,然后执行scrat init -c试试呢

xuhuan commented 9 years ago

@fouber 一开始没有独立安装 generator-scrat 的时候就重装过 scrat,结果也是不行。

image

image

刚才又执行了一边,结果依旧。

fouber commented 9 years ago

@xuhuan

scrat init -c,-c参数加了么?

如果加了还不行,你用的是什么操作系统?

xuhuan commented 9 years ago

image

@fouber 参数加了的,win2003 系统。

fouber commented 9 years ago

@xuhuan

你的npm包安装路径包含中文么?

xuhuan commented 9 years ago

@fouber 全英文路径,系统Application Data目录里面

atian25 commented 9 years ago

题主,现在如何了?

candyHuang commented 9 years ago

我安装了最新的v0.5.2版本,也遇到这个问题,window7 @atian25 @fouber 这个怎么破?

atian25 commented 9 years ago

发下报错截图?

ql2005 commented 8 years ago

=,= v0.5.12 这个问题还在... OSX 10.10.3, scrat v0.5.12, fis v1.9.39 , node v4.2.3, npm 2.14.7 报错只有一句话 ~ error You don't seem to have a generator with the name scrat installed.

重新安装了一次居然可以了.....

atian25 commented 8 years ago

有可能是 scrat-command-init 的问题, 最近升级的 scrat 都没动这个模块.

jiayisheji commented 8 years ago

在空目录下执行scrat init 后报错 error You don't seem to have a generator with the name scrat installed. v0.5.14 node 5.4.1 npm 3.3.13 win10

fouber commented 8 years ago

@jiayisheji

scrat 是npm -g 安装的么?

atian25 commented 8 years ago

云龙,我有点怀疑他们是node 5.x的npm3导致的,扁平化目录?

atian25 commented 8 years ago

@jiayisheji @ql2005 降级npm为2.x看看

myseawp commented 8 years ago

最近我们也遇到这个问题了 使用npm3+,在安装scrat-command-init组件的时候,依赖的generator-scrat没有自动安装上 导致上面的错误

回退到npm2.14.7,没问题了

jiayisheji commented 8 years ago

@myseawp 现在很多npm包都需要3+版本

henryzp commented 7 years ago

我报同样的错误。

error You don't seem to have a generator with the name scrat installed.

楼上有人解决了吗?

scrat版本:0.8.0

npm版本:3.10.6 node版本:6.2.2

系统是mac

myseawp commented 7 years ago

这个确实是npm3的扁平化目录问题 yeoman-generator只会找根目录到当前项目目录、npm全局目录,但npm3的依赖包是放在npm包/node_modules下,可以改下init组件代码:

process.env.NODE_PATH = fs.existsSync(localPath)?localPath:path.join(__dirname, '..')

通过判断localPath,扁平化目录结构,localPath肯定为空的;或者全局安装下generator组件,yeoman-generator也会查找全局目录

woshi82 commented 7 years ago

我的npm 3.10.7 process.env.NODE_PATH = fs.existsSync(path.join(localPath, 'generator-scrat'))?localPath:path.join(__dirname, '..'); 这样设置有效。 全局安装generator-scrat无效。

wanaright10 commented 7 years ago

看来都有这个问题啊, 一开始用这个框架就 error You don't seem to have a generator with the name scrat installed. 请问我还怎么继续? 重装几次都一样

henryzp commented 7 years ago

@wanaright10 ,我已经放弃了。。

据说现在FIS3都没人维护了

gisonyeung commented 7 years ago

在项目目录下本地安装一次scrat不就可以执行scrat init了吗,为什么没人说