ionic-team / ionic-pwa-toolkit

Build lightning fast Progressive Web Apps with zero config and best practices built-in. Go from zero to production ready with Ionic and Stencil (Web Components).
MIT License
633 stars 74 forks source link

processAppGraph, unable to find tag: ion-icon at addDeps #79

Closed arby50 closed 5 years ago

arby50 commented 5 years ago

@stencil/core@0.10.7

I cloned the repo and created 'my-app', npm install, npm start and the app worked. I could stop the app, restart, edit, etc. Wait 24 hours and and "npm start" results in the above error and the app wont run.

I created 'my-app2' via the same technique, assuming I had somehow corrupted the proj, exact same result after 24 hours.

I created 'my-app3' via the same technique but kept a copy. Same result, the app was fine two days ago, all I did this morning was Terminate batch job and run 'npm start' to reproduce this error. The key difference that I found was in the auto-generated file 'component.d.ts'. The original file had the following line that is now missing from the current file: import 'ionicons';

Adding that line to the file won't work since the file is auto-generated. I tried adding the following line to package.json: "ionicons": "^4.2.4" same error.

I tried 'npm install ionicons', same error. same with 'npm install ionicons --save', just in case, but same error.

/node_modules contains the folder 'ionicons' in each of the three apps.

stack trace: [ ERROR ] processAppGraph, unable to find tag: ion-icon at addDeps (D:\dev\my-app3\node_modules\@stencil\core\dist\compiler\index.js:16689:19) at Array.forEach (native) at addDeps (D:\dev\my-app3\node_modules\@stencil\core\dist\compiler\index.js:16697:22) at Array.forEach (native) at addDeps (D:\dev\my-app3\node_modules\@stencil\core\dist\compiler\index.js:16697:22) at Array.forEach (native) at getGraph (D:\dev\my-app3\node_modules\@stencil\core\dist\compiler\index.js:16699:15) at processAppGraph (D:\dev\my-app3\node_modules\@stencil\core\dist\compiler\index.js:16567:19) at processAppComponentEntryTags (D:\dev\my-app3\node_modules\@stencil\core\dist\compiler\index.js:16728:12) at generateComponentEntries (D:\dev\my-app3\node_modules\@stencil\core\dist\compiler\index.js:16714:24)

resulting app is stuck spinning on: Initializing First Build...

mrlund commented 5 years ago

I hit this issue after trying to update @ionic/core to alpha.11 but it must be related to something else, because it doesn't revert when going back to alpha.8 afterwards.

The temporary fix is to add the import to my-app.tsx import 'ionicons';

arby50 commented 5 years ago

if you need a temporary workaround, goto: \node_modules\@stencil\core\dist\compiler\index.js line 16689, change to: //throw new Error(processAppGraph, unable to find tag: ${tag}); return null;

not sure of the impact of this temporary workaround, but I am assuming ionicons display would be affected.

mrlund commented 5 years ago

@arby50 did you notice my workaround? I think it's a better solution.

arby50 commented 5 years ago

yup, your solution is better, and is probably the fix, to explicitly declare/import dependencies.

arjunyel commented 5 years ago

Still issue with "@ionic/core": "4.0.0-beta.0", "@stencil/core": "0.10.10"

manucorporat commented 5 years ago

Seems like an issue related with cache in stencil, removing manually the .stencil folder seems to fix it:

Workaround:

rm -rf .stencil

cc @adamdbradley: i have been able to reproduce this issue already many times

adamdbradley commented 5 years ago

I think I've tracked down the issue, so we'll be able to get this fixed in stencil. Thanks for the report!

ionitron-bot[bot] commented 5 years ago

Thanks for the issue! We use this issue tracker exclusively for bug reports and feature requests associated with the Ionic PWA Tookit. It appears that this issue is associated with the Ionic Framework. I am moving this issue to the Ionic Framework repository. Please track this issue over there.

Thank you for using the Ionic PWA Toolkit!

ionitron-bot[bot] commented 5 years ago

Issue moved to: https://github.com/ionic-team/ionic/issues/14939