-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Uncaught ReferenceError: module is not defined #4
Comments
Ohh.. I will investigate this. Thanks for reporting! Unfortunately I have a bit of a random response time these days, but I will try to get to this as soon as possible. |
Could you provide a minimal, reproducible example? Makes it easier for me to help out :) |
Sure,
|
No worries. Your library is great. It is almost an equal replacement to Groovy's markupbuilder. And saved me a ton of time having to write templates and services. |
That's great to hear. I recently had a child, so I have been busy with that. Hopefully I can get to fixing this soon. Lovely to hear that someone other than me get some use out of this lib! |
I receive this error using the standalone and standalone min version. The library works for BOB but it throws exceptions anytime do is used.
it appears you are assigning a key to module which doesnt exist nor does modules.
Most of your code is using modules. If you add the var modules={} and change it from module.xxx to modules.xxx the code works as expected.
I know this isn't a correct fix, but I'm node a node developer. Thes is just what worked for me.
The errored sections is as follows:
module.exports=BOB,BOBChildArray=class{constructor(l,h){this.dataset=l,this.parent=h,this.bobs=[]}content(l){return this.co(l)}co(l){var h,a,n;for(h=a=0,n=this.dataset.length;0<=n?a<n:a>n;h=0<=n?++a:--a)BOB._data=this.dataset[h],this.bobs[h]&&this.bobs[h].co(l);return this}style(l){return this.st(l)}st(l){var h,a,n;for(h=a=0,n=this.dataset.length;0<=n?a<n:a>n;h=0<=n?++a:--a)BOB._data=this.dataset[h],this.bobs[h]&&this.bobs[h].st(l);return this}class(l){return this.cl(l)}cl(l){var h,a,n;for(h=a=0,n=this.dataset.length;0<=n?a<n:a>n;h=0<=n?++a:--a)BOB._data=this.dataset[h],this.bobs[h]&&this.bobs[h].cl(l);return this}id(l){var h,a,n;for(h=a=0,n=this.dataset.length;0<=n?a<n:a>n;h=0<=n?++a:--a)BOB._data=this.dataset[h],this.bobs[h]&&this.bobs[h].id(l);return this}insert(l,h){return this.i(l,h)}i(l,h){var a,n,s;for(a=n=0,s=this.dataset.length;0<=s?n<s:n>s;a=0<=s?++n:--n)BOB._data=this.dataset[a],this.bobs[a]?this.bobs[a]=this.bobs[a].insert(l,h):this.bobs.push(this.parent.insert(l,h));return this}append(l,h){return this.a(l,h)}a(l,h){var a,n,s;for(a=n=0,s=this.dataset.length;0<=s?n<s:n>s;a=0<=s?++n:--n)BOB._data=this.dataset[a],this.bobs[a]?this.bobs[a]=this.bobs[a].a(l,h):this.bobs.push(this.parent.a(l,h));return this}prepend(l,h){return this.p(l,h)}p(l,h){var a,n,s;for(a=n=0,s=this.dataset.length;0<=s?n<s:n>s;a=0<=s?++n:--n)BOB._data=this.dataset[a],this.bobs[a]?this.bobs[a]=this.bobs[a].p(l,h):this.bobs.push(this.parent.p(l,h));return this}prettyPrint(){return this.pp()}pp(){return this.s(!0)}toString(){return this.s()}s(l=!1){var h,a,n,s,r;if(this.parent)return this.parent.s(l);for(a="",n=0,s=(r=this.bobs).length;n<s;n++)(h=r[n]).parent=!1,a+=h.s(l);return a}do(l){return this.d(l)}d(l){var a,n;for(a=0,n=this.bobs.length;a<n;a++)BOB._data=this.dataset[i],this.bobs[i]?this.bobs[i]=this.bobs[i].d(l):this.bobs.push(this.parent.d(l));return this}up(){return this.u()}u(){var l,h,a;if(!this.bobs[0])return BOB._data=null,this.parent;for(l=h=0,a=this.bobs.length;0<=a?h<a:h>a;l=0<=a?++h:--h)this.bobs[l]=this.bobs[l].u();return this.bobs[0]===this.parent?(BOB._data=null,this.parent):this}},BOB=require("./BOB.standalone"),console.log(new BOB("div").toString());
The text was updated successfully, but these errors were encountered: