EdmondsBlossom icon indicating copy to clipboard operation
EdmondsBlossom copied to clipboard

ReferenceError: b is not defined

Open joudinet opened this issue 4 years ago • 5 comments

https://github.com/mattkrick/EdmondsBlossom/blob/fab7ca8505e1577b009696c038dc804cf0acbea2/app/blossom.js#L269

I think there is a missing var at the beginning of this line, to declare the variable b. Otherwise, using this code as a module of mine, I got a reference error on Chrome.

joudinet avatar Jul 02 '20 09:07 joudinet

Same reference error for the path variable few lines below: https://github.com/mattkrick/EdmondsBlossom/blob/fab7ca8505e1577b009696c038dc804cf0acbea2/app/blossom.js#L274

joudinet avatar Jul 02 '20 10:07 joudinet

And another one in: https://github.com/mattkrick/EdmondsBlossom/blob/fab7ca8505e1577b009696c038dc804cf0acbea2/app/blossom.js#L380

joudinet avatar Jul 02 '20 19:07 joudinet

Hey @joudinet, did you manage to fix it?

VenierGiacomo avatar Jul 18 '23 06:07 VenierGiacomo

Hi @VenierGiacomo . I did fix it but this was a longtime ago and I don't remember how exactly I did it. Either I modified directly the code on the node_modules directory to declare the missing variables (i.e., the ugly way), or I found a way to load the module so that it works. In my code, I see that I do the following : import Blossom from 'edmonds-blossom' in the script part of my Vue component and the package.json file contains the following dependency : "edmonds-blossom": "^1.0.0". Then I simply call Blossom(data);. Hope it helps you.

joudinet avatar Jul 20 '23 09:07 joudinet

Hey @joudinet thanks, a lot! In the end I just copy pasted the code from the blossom.js file into my project and added the variable declaration for the missing variables. So far it seem to be working.

Thank again

VenierGiacomo avatar Jul 23 '23 10:07 VenierGiacomo