Got: Cache silently fails on particular URL

Created on 27 Apr 2020  Â·  4Comments  Â·  Source: sindresorhus/got

Describe the bug

  • Node.js version: 12.16.2
  • OS & version: Mac

Actual behavior

Using got to hit the Vue endpoint on UNPKG fails silently.

Expected behavior

For it to not silently fail.

Code to reproduce

const got = require('got');

got('https://unpkg.com/[email protected]/dist/vue.js', {
    cache: new Map(), // Removing this fixes it
}).then(console.log);

Interestingly, other endpoints work fine:

got('https://unpkg.com/react', {
    cache: new Map(),
}).then(console.log);

Will be using v10.7.0 for now.

Checklist

  • [x] I have read the documentation.
  • [x] I have tried my code with the latest version of Node.js and Got.
bug ✭ help wanted ✭

Most helpful comment

Found the bug

All 4 comments

Will be using v10.7.0 for now.

Are you saying that it works as expected on 10.7.0?

Yep

Found the bug

Thanks @szmarczak !!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

jamestalmage picture jamestalmage  Â·  3Comments

f-mer picture f-mer  Â·  4Comments

joolfe picture joolfe  Â·  3Comments

dominusmars picture dominusmars  Â·  3Comments

alanzhaonys picture alanzhaonys  Â·  4Comments