ky: Module not found: Can't resolve 'ky' with version 0.28
Upgrading to ky@0.28, i get Module not found: Can't resolve 'ky'
.
When i open vs code and look at the ‘ky’ module it refers to index.d.ts
and load typescript definition instead of index.js.
I use create-react-app i don’t know if that help you but it works perfectly fine with ky@0.27
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Reactions: 17
- Comments: 18 (1 by maintainers)
Same here, I’m downgrading to 0.27.0 for now.
having the same problem with a vue-cli app
Todo: will add steps to reproduce
@LoiKos The fix is solving the issue I had with ESM imports.
@ux-engineer The following is working for me:
https://github.com/sindresorhus/ky/releases/tag/v0.28.2
Same issue here…
This is a blocker for me to upgrade to the latest ky 0.28.0 (using vue-cli). I don’t know the ins and outs of npm package deployment, but when I use over 80+ dependencies directly in my application with vue-cli, and this is the first time such a problem has ever happened to me with any library, seems like perhaps having other vendors “fix” this issue (even if they are in the wrong) may not be the best solution? Just a humble suggestion 😃
Repro:
npm install -g @vue/cli
vue create -p default testerson
cd testerson
npm install ky
import ky from 'ky'
Open src/main.js and addimport ky from 'ky'
npm run serve
Result:
I appreciate the work you do on this library, it is awesome! Thank you for your work!
Working fine for me ! If others can confirm it is working fine too, i could close the issue.
I was using 0.28.1 but downgrading to 0.27.0 resolved the issue
With that logic, you might as well ask the Node.js folks to stop adding new features, and remove support for the
exports
field as a supported feature in Node, since apparently we can’t start using those things without it being our fault when other tools break, and we shouldn’t ask those tools to update, even if we’ve waited years for them to do so.I don’t intend that to sound so flippant, but that’s the ultimate conclusion of what you’re suggesting.
@LoiKos and @Eric-Dunaway could you please also file an issue on the repos for those tools?
Once that’s done, I’ll create a branch of Ky that you can use as a workaround.