Closed pooya1361 closed 7 years ago
Same issue. I was able to work around by setting the version of FontAwesome to 4.5.0 in package.json. Most likely the new version broke the script.
I can confirm that this works.
However, in order for the "fix" to work, you can't use the "binary" in your path. You have to call it directly using Node.
Will not work:
font-awesome-svg-png --list
Will work:
node font-awesome-svg-png.js --list
Update: The code successfully runs, but only generates a bunch of empty (blank) .png files for me... Fortunately, I can use the intact .svg versions to create .png versions...
Edit: I was able to get it working. As I recall, I think the problem with the blank .png files is that I needed to put my hex code color in quotes.
@gdewald Can you tell me where to modify the code?
@HyramTang Probably /usr/local/lib/node_modules/font-awesome-svg-png/
but you can find out for sure in the first line of the trace, like the one pasted in the first message of this issue. cd there and edit the font-awesome dependency to "4.5.0"
in package.json. Then npm install
(might need to sudo)
Unable to get this working after changing the version to"4.7.0"
in package.json. After running npm install
I get:
npm WARN enoent ENOENT: no such file or directory, open '/Users/sinahassan/package.json'
npm WARN sinahassan No description
npm WARN sinahassan No repository field.
npm WARN sinahassan No README data
npm WARN sinahassan No license field.
Any ideas?
thanks @gdewald
cd /usr/local/lib/node_modules/font-awesome-svg-png/
nano package.json
update font-awesome
to 4.5.0
save and exit
npm i
then it all worked fine
This is because there are changes in the 4.7 file. Use this repo tupadr3/Font-Awesome-SVG-PNG
@joshdavenport Your solution is good for me. Thanks!
Thank you for everybody participating and I apologize for not attending to this repo. Hopefully this latest update amends my absence. Newest version should address all problems.
Hi, I get this error meesage when I run the following command in terminal:
font-awesome-svg-png --color white --no-png
Error message:Cought error TypeError: Cannot read property 'charCodeAt' of undefined at /usr/local/lib/node_modules/font-awesome-svg-png/lib/getFontData.js:20:39 at tryCatcher (/usr/local/lib/node_modules/font-awesome-svg-png/node_modules/bluebird/js/main/util.js:26:23) at MappingPromiseArray._promiseFulfilled (/usr/local/lib/node_modules/font-awesome-svg-png/node_modules/bluebird/js/main/map.js:56:38) at MappingPromiseArray.init (/usr/local/lib/node_modules/font-awesome-svg-png/node_modules/bluebird/js/main/promise_array.js:92:18) at Promise._settlePromiseAt (/usr/local/lib/node_modules/font-awesome-svg-png/node_modules/bluebird/js/main/promise.js:582:21) at Promise._settlePromises (/usr/local/lib/node_modules/font-awesome-svg-png/node_modules/bluebird/js/main/promise.js:700:14) at Async._drainQueue (/usr/local/lib/node_modules/font-awesome-svg-png/node_modules/bluebird/js/main/async.js:123:16) at Async._drainQueues (/usr/local/lib/node_modules/font-awesome-svg-png/node_modules/bluebird/js/main/async.js:133:10) at Immediate.Async.drainQueues (/usr/local/lib/node_modules/font-awesome-svg-png/node_modules/bluebird/js/main/async.js:15:14) at runCallback (timers.js:637:20) at tryOnImmediate (timers.js:610:5) at processImmediate [as _immediateCallback] (timers.js:582:5)