googleapis/node-gtoken

Module not found: Error: Can't resolve './types/other'

cin3rama opened this issue · 3 comments

Don't know if this is you guys, mime or me. Below is the error and the fix I applied.

ref: +-- node-gtoken@2.3.0
-- mime@2.3.1

WARNING in ./node_modules/gtoken/node_modules/Mime/index.js
There are multiple modules with names that only differ in casing.
This can lead to unexpected behavior when compiling on a filesystem with other case-semantic.
Use equal casing. Compare these module identifiers:

  • F:\app\bc\node_modules\gtoken\node_modules\Mime\index.js
    Used by 2 module(s), i. e.
    F:\app\bc\node_modules\gtoken\node_modules\mime\index.js
  • F:\app\bc\node_modules\gtoken\node_modules\mime\index.js
    Used by 1 module(s), i. e.
    F:\app\bc\node_modules\gtoken\build\src\index.js

ERROR in ./node_modules/gtoken/node_modules/Mime/index.js
Module not found: Error: Can't resolve './types/other' in 'F:\app\bc\node_modules\gtoken\node_modules\Mime'
ERROR in ./node_modules/gtoken/node_modules/mime/index.js
Module not found: Error: Can't resolve './types/other' in 'F:\app\bc\node_modules\gtoken\node_modules\mime'
ERROR in ./node_modules/gtoken/node_modules/Mime/index.js
Module not found: Error: Can't resolve './types/standard' in 'F:\app\bc\node_modules\gtoken\node_modules\Mime'
ERROR in ./node_modules/gtoken/node_modules/mime/index.js
Module not found: Error: Can't resolve './types/standard' in 'F:\app\bc\node_modules\gtoken\node_modules\mime'

Fix: add ".json" extension to json file reference in gtoken/node_modules/mime/index.js

was: module.exports = new Mime(require('./types/standard'), require('./types/other'));
fix applied: module.exports = new Mime(require('./types/standard.json'), require('./types/other.json'));

I know I shouldn't have to muck with it but it is what it is. Btw, I didn't attempt to modify the casing.

Greetings! I've never really seen this error from this library, and I can't seem to reproduce it. Can you share a few details?

  • What version of nodejs are you running?
  • What does your package.json look like?
  • Can you share a code sample?

If you're still having issues... please do let us know!

Thank you for addressing this Justin. I apologize. I forgot to come back and update this issue. I solved it.

For reference: my mistake - I accidentally applied it to client side code. When I realized it and moved it to cloud functions all went right for me.

Thank you again...