-
Notifications
You must be signed in to change notification settings - Fork 176
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
<cv-file-uploader> Failed to resolve import #1573
Comments
Hmm I cannot reproduce this. I think you are correct that its may have something to do with 'env.d.ts' file. What happens if you remove the "declare module " statement? |
@davidnixon Error remained even after removal of all declarations from "env.d.ts". I also must say that I use there practically all carbon components, and cv-file-uploader is the only one having this issue. |
This issue has been marked as stale because it has required additional |
Not sure what more should I include in my response. The problem still persists as described. I only managed to avoid the problem by having a modified copy of CvFileUploader component, where I have removed the CvForm wrapper. As mentioned, other carbon components work for me as expected. |
I do not think I fully understand the use case but I think I do see the issue. Several index files import like this: import CvForm from './CvForm'; Notice the lack of ".vue" extension! import CvForm from './CvForm.vue'; Could you try this patch? npm remove @carbon/vue
npm add ./carbon-vue-3.0.16-5f775.tgz Another possible fix. Can you remove "declare module '@carbon/vue/src/components/*'"? I think maybe your use case is related to an issue @OlkaB resolved in April. #1578 which nows allow you to import individual components. So this should work without the import { CvFileUploader } from '@carbon/vue'; |
@davidnixon I confirm, the CvFileUploader component worked as expected while using carbon-vue-3.0.16-5f775.tgz |
Failed to resolve import
Detailed description
CvFileUploader throws error when used in my project. The error is "Failed to resolve import", which is related to CvForm component import in the file-uploader component.
In my env.d.ts I have declared the path as "declare module '@carbon/vue/src/components/*'", and I tried with different variations as well.
Still getting error:
What works for me is to modify the CvFileUploader component and remove the CvForm wrapper inside, but of course that's not permanent solution.
Any recommendation? Is this a bug?
Steps to reproduce the issue
Additional information
The text was updated successfully, but these errors were encountered: