-
-
Notifications
You must be signed in to change notification settings - Fork 377
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Module not found: Can't resolve 'ky' with version 0.28 #340
Comments
Hi @LoiKos and thanks for reporting this. I was able to reproduce the issue relatively easily with some educated guesses. That said, in the future, please provide reproduction steps or a sample repository. There are people out there like me who don't use CRA. Here are the reproduction steps:
I was able to fix the problem by modifying Arguably, this is likely a problem with CRA itself. But at the same time, maybe we should consider going back to |
Yeah sorry for missing information. I was able to reproduce in codeSandbox : https://codesandbox.io/s/vigilant-hooks-mw7xl?file=/src/App.tsx |
having the same problem with a vue-cli app Todo: |
@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. |
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: Result:
I appreciate the work you do on this library, it is awesome! Thank you for your work! |
With that logic, you might as well ask the Node.js folks to stop adding new features, and remove support for the I don't intend that to sound so flippant, but that's the ultimate conclusion of what you're suggesting. |
It's all good, you understand the actual workings and I don't. I'm just commenting as a consumer of your product and letting you know my experience. Thanks, hope this gets fixed either way as I'd love to continue to use ky in it's most modern form! |
I have created an issue inside CRA facebook/create-react-app#10933 feel free to add more information as i'm not really sure i understand where the problem comes from. |
It seems the latest package.json of ky lacks both
|
Same here, I'm downgrading to 0.27.0 for now. |
* add ["@babel/plugin-proposal-private-methods", \{ "loose": true }] to Babel plugins (due to Babel's warning) * adjust mocking Ky (see sindresorhus/ky#170 and sindresorhus/ky#340) * add TS transformation
Same issue here... |
I was using 0.28.1 but downgrading to 0.27.0 resolved the issue |
I've same issue with ky-universal. //import ky from 'ky';
import ky from '@/node_modules/ky/distribution';
export default ky; |
Apparently the unpkg CDN is also having trouble with our package.json. Today I discovered that importing Ky from |
Working fine for me ! If others can confirm it is working fine too, i could close the issue. |
Just upgraded to 0.28.2. from 0.27.x, which resolved the first error that was produced by upgrading to 0.28.1. However, after this upgrade I'm unable to import types from this library, as TypeScript 4.2.4 is giving errors about not finding these type exports 'has no exported member'.
|
@LoiKos The fix is solving the issue I had with ESM imports. @ux-engineer The following is working for me:
|
Upgrading to [email protected], 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 [email protected]
The text was updated successfully, but these errors were encountered: