-
Notifications
You must be signed in to change notification settings - Fork 773
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
Stencil becomes a dependency to project when installing with --legacy-peer-deps #5808
Comments
@andberg thanks for raising the issue! It seems to me that the package containing the Stencil components ( |
Hi!
And then it's imported and enhanced for different environments in these config files https://gitlab.com/arbetsformedlingen/designsystem/digi/-/tree/develop/libs/arbetsformedlingen/package/.config?ref_type=heads
I was not part of this project when this was set-up, so am bit of a noob when it comes to Stencil and it's configuration. I've searched the project for The complete repo is open source and can be found here https://gitlab.com/arbetsformedlingen/designsystem/digi |
Yes, it defaults to
Yes, it is part of the output target docs: https://stenciljs.com/docs/v4.7/custom-elements#externalruntime. I recommend setting |
Thank you @christian-bromann, for your response! I will change this in our output target config, try it in my example and get back to you. |
@andberg I will go ahead and close this. Let me know if you have any further questions or if you think we could do better in the Stencil docs. Thanks for supporting Stencil! |
We are trying a fix for this today. It can be that we've imported from the wrong package in Stencil. I will document the result from our findings here when we have them. :) |
@christian-bromann Hi Again! |
@andberg I am not aware of any drawbacks, it very much depends on your use case. |
I understand. Then we will discuss it within our team and see what we decide. |
Background
I'm working with a designsystem built with Stencil. We've gotten reports from teams using our UI-components that they've had to add Stencil as a dependency (primarily in the pipelines), which confused me.
According to the Stencil documentation; "The code generated by Stencil does not rely on Stencil, but rather it generates highly-optimized, framework-free, stand-alone code which runs natively in the browser." from: https://stenciljs.com/docs/faq#what-dependencies-does-the-stencil-runtime-have
Current behavior:
When investigating the issue I realized that the teams get the issue when they use the
--legacy-peer-deps
flag when runningnpm install
.Steps to reproduce
Locally:
Result and expected result
Everything works fine
In Pipeline
Expected Result
Everything works just as fine as it is locally
Actual result
The job in the pipeline complains
Error: Module not found: Error: Can't resolve '@stencil/core/internal/client'
You can se the different outcomes in the Pipeline of this project. The ones without
--legacy-peer-deps
work fine, the other not so fine.Question or maybe bug-report
We have some teams that has som legacy code that need the --legacy-peer-deps flag and the results in that they also have to have Stencil as a dependency. I wonder why. Is this known by you and accepted behavior or is this a bug?
GitHub Reproduction Link:
Repo showcasing issue
The text was updated successfully, but these errors were encountered: