-
Notifications
You must be signed in to change notification settings - Fork 789
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
bug: renaming a a component file whilst being watched causes an error #3443
Comments
Thanks @johnjenkins! I was able to confirm this has been around since at least v2.7.0. Labelling this so that it gets ingested into the backlog |
Hi @johnjenkins! I think it is a valid error and that it only warns you that something is wrong in the test file. If you correct the path in
I think this issue could be closed or, perhaps, renamed to "Test files should be ignored in browser transpilation with |
hey @linuxonrails, thanks for your input! however, even when no tests exist in a project, I am able to reproduce this issue. the root cause has to do with a race condition where the dev server isn't able to understand that the file has changed it's name |
This fixes a small issue where we were accessing a possibly-undefined property on a TypeScript Diagnostic record. This relates to the issue reported in #3443.
Just a quick update on this, I just opened a small PR (#3627) which fixes a bit of diagnostic handling code where we were accessing a property on a possibly-undefined value without checking. After fixing that issue one thing I'm consistently running into is this upstream issue in TypeScript: microsoft/TypeScript#43838 |
* fix(compiler): handle file rename in watch mode Fixes: #3443 STENCIL-1104 * fix(ci): update pipeline name * parity w/ other test workflows --------- Co-authored-by: Christian Bromann <[email protected]>
A fix for this has been released in Stencil |
Prerequisites
Stencil Version
2~ (happens in 2.17.0 but has been present for a long time)
Current Behavior
using the latest version of stencil, whilst within
--watch
mode, change any component file name (e.g.my-component.tsx
tomy-new-component.tsx
) and stencil fails with an error:Expected Behavior
not to fail :)
Steps to Reproduce
npm init stencil
> select the component variant.cd NEW_COMPONENT_DIR
npm i
npm start
rename
src/components/my-component.tsx
tomy-new-component.tsx
Code Reproduction URL
just use
npm init stencil
Additional Information
No response
The text was updated successfully, but these errors were encountered: