Skip to content
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

Open
krko12345 opened this issue Feb 17, 2024 · 3 comments
Open

<cv-file-uploader> Failed to resolve import #1573

krko12345 opened this issue Feb 17, 2024 · 3 comments

Comments

@krko12345
Copy link

krko12345 commented Feb 17, 2024

Failed to resolve import

Detailed description

Describe in detail the issue you're having.

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:
image

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?

Is this a feature request (new component, new icon), a bug, or a general issue?
issue

Is this issue related to a specific component?
CvFileUploader

What did you expect to happen? What happened instead? What would you like to see changed?
Expected the component to load, instead it throws error.

What browser are you working in?
Edge

What version of the Carbon Design System are you using?
3.0.12

What offering/product do you work on? Any pressing ship or release dates we should be aware of?

Steps to reproduce the issue

  1. Step one
  2. Step two
  3. Step three
  4. etc.

Additional information

  • Screenshots or code
  • Notes
@krko12345
Copy link
Author

krko12345 commented Feb 17, 2024

The problem seems to move to next line if I modify it to use parent directory path (instead of current directory) for the import

image

@davidnixon
Copy link
Collaborator

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?

@krko12345
Copy link
Author

krko12345 commented Apr 4, 2024

@davidnixon Error remained even after removal of all declarations from "env.d.ts".
It wouldn't be a solution anyway because without declarations the code would fail to compile from typescript.

I also must say that I use there practically all carbon components, and cv-file-uploader is the only one having this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants