bpk68/g-sheets-api

Uncaught ReferenceError: require is not defined

MetaDevelopment opened this issue · 2 comments

Hi Rob,

Thank you very much for creating this, this looks exactly like what I'm looking for.

However, unfortunately I can't get it working. I'm using a gulp-build and I'm unsure how to properly import this Google Sheets Reader.

I've followed the steps in your guide, but I don't know how to work with the require line (/call the reader function). I've tried putting the require line in my gulpfile.js, but then the browser gives the error that GSheetReader is not defined. If I put the require line in my Javascript-file, I get the browser console error that require is not defined.

I've tried several things, like using the require script from https://requirejs.org/ and referencing other (closed) issues on this repo: checking your sandbox version (https://codesandbox.io/s/g-sheets-reader-demo-qm5r0?file=/src/index.js) and trying to get the CDN link to work, but I don't manage to get it working.

It's probably due to my missing knowledge about how require etc works, but can you please help me with those extra steps to get this working? Is it possible to just add a Javascript-file to my build like other Javascript-plugins?

bpk68 commented

Hey @MetaDevelopment.

Thanks for raising the issue. I must apologise for taking such a long time to get back to you. Personal/family stuff has got in the way and I'm only just getting my head above water now to take care of things.

Are you still struggling with the package and do you still need help?

I've just released the latest version this morning which might help you out, but if you still need help then give me a shout and please include a link to your repository so we can take a look at how you're consuming the package and we'll see if we can get you unstuck 😊.

bpk68 commented

Going to close this as solved/unresponsive. Please feel free to reopen or create a new issue if the problem isn't fixed and I'll be happy to help.