Stencil version:
@stencil/[email protected]
I'm submitting a:
[x] bug report
[ ] feature request
[ ] support request => Please do not submit support requests here, use one of these channels: https://stencil-worldwide.herokuapp.com/ or https://forum.ionicframework.com/
Current behavior:
In our project we added src/components.d.ts to .gitignore, since we think that a auto generated file shouldn't be version controlled and could lead to unnecessary merge conflicts.
Problem is that running the build script on a fresh checkout will throw the following error.
[ ERROR ] Rollup: Unresolved Import
Could not resolve './components' from src/index.js
After the error was thrown the src/components.d.ts file is generated anyway. So running the build script a second time will build the project correctly.
Expected behavior:
stencil build build should check for src/components.d.ts first. If not present, the file will be created. After creation the build should be executed.
Steps to reproduce:
src/components.d.tsnpm buildCreating component.d.ts is not that easy since it requires to transpile first everything. It's fixable, but a not trivial amount of work needs to be done. We might revisit it once we port to TS 3.6 (since we plan to use the new incremental apis). In the meantime, we recommend to commit that file.
is this now fixed? If I delete src/components.d.ts and then run npm run build then the file is regenerated. I'm using "@stencil/core": "^1.8.1" which has TypeScript 3.7 as a dependency.
@devinshoemaker I also observed this behaviour. But unfortunately the issue is still existing. It worked on my local machine but not on my CI pipeline. After some tests, I observed, that the build error appears if you
npm install following by a npm run-script build in a clean environment.Confirmed the scenario mentioned by @cremich. Emptying the components.d.ts file is another way to replicate this issue.
Should not happen anymore since we released in the compiler update using latest TS!
@manucorporat
Still doesn't work for me and I am using
"@stencil/core": "^1.13.0",
Steps to reproduce :

I found it had fixed in 1.14.0! @stephenbe
@euxn23 , I'm on 1.17.3 version right now and this issue is still reproducible for me (in the same way as described in initial comment). @manucorporat , maybe some updates after fix broke this flow again?
@euxn23 , I'm on
1.17.3version right now and this issue is still reproducible for me (in the same way as described in initial comment). @manucorporat , maybe some updates after fix broke this flow again?
Ditto - I've upgraded to stencil core v2.1.0 and can't get a clean build. Nothing listed in this thread seems to have fixed the issue for me. I have an external module, and this error happens when importing the external module.
This still seems like an issue in v2.3.0. If I delete components.d.ts the first time I build it fails due the the error above. The second time it succeeds because the previous run generated components.d.ts.
Most helpful comment
@manucorporat
Still doesn't work for me and I am using
"@stencil/core": "^1.13.0",
Steps to reproduce :