Skip to content
This repository has been archived by the owner on Sep 1, 2020. It is now read-only.

can't we use "openbadges-bakery" in Node version above 0.10.30 #14

Open
akshayporwal opened this issue Feb 27, 2018 · 11 comments
Open

can't we use "openbadges-bakery" in Node version above 0.10.30 #14

akshayporwal opened this issue Feb 27, 2018 · 11 comments

Comments

@akshayporwal
Copy link

Hi Team,

We can't use "openbadges-bakery" module in higher version of node like above v6.

Please help me i am facing issue from last 3 days. Its working fine with version 0.10.30. but if i am using v7.10.0 then it is not working .
Error msg :
on\node_modules\bitwriter\index.js:357
var len = this.length;
^

TypeError: Method get TypedArray.prototype.length called on incompatible receive
r [object Object]
at BitWriter.get length [as length] ()
at BitWriter.makeArrayLike [as _makeArrayLike] (C:\Users\aporwal\Documents\V
isual Studio 2015\Projects\CrudOperation\CrudOperation\node_modules\bitwriter\in
dex.js:357:17)
at BitWriter.setupBuffer (C:\Users\aporwal\Documents\Visual Studio 2015\Proj
ects\CrudOperation\CrudOperation\node_modules\bitwriter\index.js:72:8)
at BitWriter.initialize (C:\Users\aporwal\Documents\Visual Studio 2015\Proje
cts\CrudOperation\CrudOperation\node_modules\bitwriter\index.js:58:8)
at new BitWriter (C:\Users\aporwal\Documents\Visual Studio 2015\Projects\Cru
dOperation\CrudOperation\node_modules\bitwriter\index.js:10:19)
at BitWriter (C:\Users\aporwal\Documents\Visual Studio 2015\Projects\CrudOpe
ration\CrudOperation\node_modules\bitwriter\index.js:9:12)
at new Output (C:\Users\aporwal\Documents\Visual Studio 2015\Projects\CrudOp
eration\CrudOperation\node_modules\streampng\lib\chunks\base.js:161:17)
at constructor.outputPrepare [as _outputPrepare] (C:\Users\aporwal\Documents
\Visual Studio 2015\Projects\CrudOperation\CrudOperation\node_modules\streampng
lib\chunks\base.js:155:13)
at constructor.makeBuffer [as _startOutput] (C:\Users\aporwal\Documents\Visu
al Studio 2015\Projects\CrudOperation\CrudOperation\node_modules\streampng\lib\c
hunks\international-text.js:38:21)
at constructor.out (C:\Users\aporwal\Documents\Visual Studio 2015\Projects\C
rudOperation\CrudOperation\node_modules\streampng\lib\chunks\international-text.
js:23:19)

@campbell-thinkingcap
Copy link

Having sort of the same issue I think.
I'm not recieving any errors. When I try to write the file data is undefined.

bakery.bake(options, function (err, data) {

Saves the file with the .png extension but with the text undefined.

console.log(data) in the callback outputs undefined.

@hadyrashwan
Copy link

hadyrashwan commented Jul 28, 2018

Did anyone find a way to bake image using nodejs ?? @campbell-thinkingcap @akshayporwal

@iamgoodbytes
Copy link

It would be good to know before diving into openbadges if this library is still actively being supported or maintained. Did any of you figure out how to bake images or did you look for other solutions?

@iamgoodbytes
Copy link

I can confirm that this issue still happens with png images. SVG's seem to work though.

@auralon
Copy link
Contributor

auralon commented Feb 11, 2019

Hey folks, this library hasn't been updated in a long time. It needs some work to make it compatible with newer versions of node. It also doesn't support the latest openbadges spec (2.0).

@auralon
Copy link
Contributor

auralon commented Feb 11, 2019

This is basically a dupe of the only other open issue too #13

@iamgoodbytes
Copy link

Hi @auralon — on a more general note, is openbadges still something people use or is it an abandoned project?

@auralon
Copy link
Contributor

auralon commented Feb 11, 2019

@iamgoodbytes openbadges are definitely still in use, yes! The new spec came out recently. Platforms like Acclaim are growing in popularity, and it's at the very core of their business model.

Just because this library is old, and (currently) incompatible with the latest badge spec, don't let it put you off! :)

@iamgoodbytes
Copy link

Thanks for sharing your thoughts @auralon !

@kayaelle
Copy link

I submitted an issue to IMS to see if they will support this library.

1EdTech/openbadges-specification#248

This issue has been open in Bit Writer since 2015:

brianloveswords/streampng#12

I suspect we'll have to get some community volunteers to pick this up. My nodeJS is kinda rusty. Anyone want to jump in and work with me on it?

@kayaelle
Copy link

kayaelle commented Oct 11, 2019

I submitted an issue to IMS to see if they will support this library.

IMSGlobal/openbadges-specification#248

This issue has been open in Bit Writer since 2015:

brianloveswords/streampng#12

I suspect we'll have to get some community volunteers to pick this up. My nodeJS is kinda rusty. Anyone want to jump in and work with me on it?

I made a pr here: brianloveswords/streampng#17

The test script fails but the updates to the packages seem to produce a valid baked badge that I uploaded and tested here: https://badgecheck.io/

Would love to see if someone else can try this and get the tests working. If @brianloveswords can't get back to this, we can fork a new version.

Update: a fork is being hosted here https://github.com/OpenWorksGroup/openbadges-bakery/ it references this fork https://github.com/OpenWorksGroup/streampng which is where the updates were needed. Confirmed it works with node v9.6.1 but tests fail.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants