Michigan-Tech-Courses / rate-my-professors

a basic wrapper for Rate My Professors's GraphQL API
MIT License
11 stars 9 forks source link

Using this module in a Chrome extension #17

Closed mahfoozm closed 1 year ago

mahfoozm commented 1 year ago

Hi, I'm working on a chrome extension to display a professors rating on my universities course portal, but I'm having trouble with the implementation, and was wondering if I was missing an obvious detail.

Problem: https://stackoverflow.com/questions/74905140/am-i-including-npm-modules-in-my-chrome-extension-correctly

Repository: https://github.com/mahfoozm/YorkURMP

Thanks!

codetheweb commented 1 year ago

It sounds like this package is working correctly and there's a problem with your bundling setup. Unfortunately I'm not super familiar with building extensions so I can't help much, sorry.

njerig commented 1 year ago

I get the following error when I use this from my Chrome extension:

Uncaught (in promise) ReferenceError: XMLHttpRequest is not defined
at browser-ponyfill.js:462:1

This is coming from graphql-request using cross-fetch. (Evidence: when I add fetch to the GraphQLClient options object, the error disappears.)