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
Can't import styles #3275
Comments
Splitting this out as this is not the same issue. The prior thread is related to being unable to import
I would guess that the highlight.js version used by |
Oh I was reading that like swarm was a dependency of your project but perhaps it's the main project...? if so then I'm not sure what is happening... but if you open package.json in highlight.js you should be able to confirm that the exports are all listed there... Maybe you aren't using the version you think you are? I'd check out the file it's saying doesn't have the exports and see if it does or doesn't. Note: If your linter doesn't properly support wildcard exports then you may need to upgrade it or simply disable this warning. |
Thanks @joshgoebel, sorry for not realizing it was a separate issue - thanks for splitting it out. One thing I did forget to mention (though it shouldn't make a difference), is this is a mono-repo where swarm is the git repository and we have services, ui libraries, and several application all using the libraries in a packages folder. That results in the npm packages being located in I did try to disable eslint for those lines (the failure happens for the Just for confirmation - I have the following versions: Sounds like no one else is having problem with this, so I'm going to guess it's some configuration problem we've missed in our lint, build, tool chain. I'll look at it some more and when I figure out what's gone amiss I'll come back here, outline the problem and close (assuming I find and fix a configuration problem) Thanks! |
Good luck.
This isn't the latest release, perhaps there are subpath bugs that a more recent v12 release fixes. A lot of the ESM stuff was back-ported to v12 in minor releases and therefore it improved with time... just one idea. |
Actually, If you make the exports static vs the wildcard I wonder if that would fix it? Would be an interesting data point... |
@joshgoebel Thanks for your help and input on this. I dug in a bit more and found that one of our packages ended up with a slight misconfiguration of build tools when we move them all into the mono-repo. For some reason everything seems to be working "fine" until this upgrade that explicit defines the exported packages. Anyway, it was a problem with the configuration for |
No problem. Glad you got it sorted. |
Not sure this is really fixed yet - it also happens on regular npm package. I assume it's a problem here because 10.x works but 11.x does not - I don't have this issue with any other npm package. I migrated to 11.0.0 when it came out and had to roll back to latest 10.x because of this problem. I upgraded to 11.1.0 this morning and still have this issue.
dependencies:
imports:
attempt to lint (build same problem, but not from eslint obviously):
However, this works, but is not right:
Edit
Actually, the
../../node_modules/
bit makes eslint work, but both my current webpack and rollup builds fail with the path specified.Originally posted by @bitencode in #3223 (comment)
The text was updated successfully, but these errors were encountered: