small-tou / js2image

一个可以把js源代码压缩成一个ascii字符画的源代码的工具,压缩后的代码仍可运行 (A tool can compress JavaScript code to any ascii image and still run normally )

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

TypeError: Cannot read property 'replace' of undefined

bumaociyuan opened this issue · comments

commented
onverting ./resource/release.js
[Error: Could not execute GraphicsMagick/ImageMagick: gm "identify" "-ping" "-format" "%wx%h" "/usr/local/lib/node_modules/js2image/resource/tree.png" this most likely means the gm/convert binaries can't be found]
/usr/local/lib/node_modules/js2image/utils/image-to-struct.js:19
      var content = converted.replace(/\S\[0m/g,"").replace(/\n/g,"\",\n\"");
                             ^

TypeError: Cannot read property 'replace' of undefined

TypeError: Cannot read property 'replace' of undefined
README 需要更新

npm install -g replace

不是这个问题引起的,看起来是没有安装GraphicsMagick依赖造成的,可以看下文档如何安装

commented

装了GraphicsMagick 依然报这个

2015-12-24 16:29 GMT+08:00 芋头 notifications@github.com:

不是这个问题引起的,看起来是没有安装GraphicsMagick依赖造成的,可以看下文档如何安装


Reply to this email directly or view it on GitHub
#9 (comment).

this most likely means the gm/convert binaries can't be found

应该是装失败了。是什么系统?

commented

macos 10.11.1

npm install -g replace 装了就可以用了

windows 10 系统,我也遇到了这个问题,首先,下载并安装了graphicsmagick.exe, 然后,npm install -g replace ,然后就可以了。

commented

@RainCha 所以要更新 readme 啊

2015-12-24 21:40 GMT+08:00 RainCha notifications@github.com:

windows 10 系统,我也遇到了这个问题,首先,下载并安装了graphicsmagick.exe, 然后,npm install -g
replace ,然后就可以了。


Reply to this email directly or view it on GitHub
#9 (comment).

是的,作者赶紧更新啊。

npm install -g replace

我没太理解是为什么需要这个。。。

刚刚看了image-to-struct.js,npm install -g replace 这个应该是不需要的,但是觉得readme,还是需要强调一下windows系统的情况。

恩,那我先备注下

已加到readme,感谢大家