Stencil build "Generated an empty bundle"


#1

Hi,
I’m starting my test PWA program with ionic-pwa-toolkit.
I followed the “Getting Started” in https://github.com/ionic-team/ionic-pwa-toolkit
The step “npm install” run fine, however in the step “npm start” I got an issue with stencil build as the following:

E:\projects\test\my-app>npm start
> @ionic/pwa-toolkit@0.0.1 start E:\projects\test\my-app
> stencil build --dev --watch --serve
[47:08.8] @stencil/core v0.10.0
[47:08.9] build, app, dev mode, started …
[47:09.0] module map started …
[47:09.0] generate styles started …
[47:09.1] module map finished in 78 ms
[47:09.1] compile global style start …
[47:10.9] compile global style finish in 1.85 s
[47:10.9] generate styles finished in 1.88 s
[47:10.9] generate bundles started …
[47:10.9] generate bundles finished in less than 1 ms
[47:10.9] generate app files started …
[47:13.5] generate app files finished in 2.62 s

[ WARN ] build warn
Generated an empty bundle

[47:14.6] dev server: http://localhost:3333/
[47:14.6] build finished, watching for changes… in 5.76 s

And when I start http://localhost:3333/, it showed a blank page.

How can I fix it?

Thanks in advance for your help.


#2

I’ve tried with the other my PC, it still announces “Generated an empty bundle”, but it can run and displayed the default page.
Below are the versions of node and npm on these 2 PCs:
The PC can run Stencil (A): node v6.7.0 + npm v3.10.9
The PC cannot run Stencil (B): node v8.9.4 + npm v6.2.0

I also built the source with: npm run build
And saw that the folder www\build\app on PC A has svg folder and many files than PC B. While PC B has only 4 files: app.global.js, app.registry.json, app.wmh0mwtu.js, app.x4gvepmp.js

How can I fix this?


#3

javascript community…


#4

I guess the warning could be ignored, for now on I guess. I went thru the stencil slack channel and found a comment of Manu of Ionic telling: WARN Generated an empty bundle should not be a problem