I installed the library from npm, and I got this error from simply requiring it:
TypeError: typeMap[type].map is not a function
at Mime.define (/app/node_modules/mime/Mime.js:41:36)
at new Mime (/app/node_modules/mime/Mime.js:12:10)
at Object.<anonymous> (/app/node_modules/mime/index.js:4:18)
at Module._compile (internal/modules/cjs/loader.js:1133:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1153:10)
at Module.load (internal/modules/cjs/loader.js:977:32)
at Function.Module._load (internal/modules/cjs/loader.js:877:14)
at Module.require (internal/modules/cjs/loader.js:1019:19)
at require (internal/modules/cjs/helpers.js:77:18)
at Object.<anonymous> (/app/node_modules/gtoken/build/src/index.js:20:14)
the stacktrace suggests it's an error with Mime, which this library does not have as a dependency, but assumably, one of the dependencies in a dependency tree does.
googleapis version: I've tried both latest (49.0.0) and 39.0.0, as the developers article suggested.'googleapis'. (require('googleapis'))Making sure to follow these steps will guarantee the quickest resolution possible.
Thanks!
Greetings @1s3k3b! I am struggling to recreate this one locally. Could I trouble you to try a few things?
rm -rf node_modules package-lock.json
npm install
If it's still not working after that, can you share your package.json?
Also, if you could run npm ls mime and share the output, that would be helpful.
That seems to have fixed it, thank you for the response!