Ionic start followed by ionic serve fails today

Today I did this:

ionic start quiz2 blank
cd quiz2
ionic serve

and I get this error:

$ ionic serve
> ng run app:serve --host=localhost --port=8100
[ng] ℹ 「wds」: Project is running at http://localhost:8100/webpack-dev-server/
[ng] ℹ 「wds」: webpack output is served from /
[ng] ℹ 「wds」: 404s will fallback to //index.html
[ng] chunk {home-home-module} home-home-module.js, home-home-module.js.map (home-home-module) 4.87 kB  [rendered]
[ng] chunk {main} main.js, main.js.map (main) 13.3 kB [initial] [rendered]
[ng] chunk {polyfills} polyfills.js, polyfills.js.map (polyfills) 278 kB [initial] [rendered]
[ng] chunk {runtime} runtime.js, runtime.js.map (runtime) 8.94 kB [entry] [rendered]
[ng] chunk {styles} styles.js, styles.js.map (styles) 108 kB [initial] [rendered]
[ng] chunk {vendor} vendor.js, vendor.js.map (vendor) 4.61 MB [initial] [rendered]
[ng] Date: 2019-08-07T17:14:00.206Z - Hash: c4de417d902f37b4e786 - Time: 6119ms
[ng]
[ng] ERROR in ./node_modules/@ionic/angular/dist/fesm5.js 5823:19-33
[ng] "export 'applyPolyfills' was not found in '@ionic/core/loader'
[ng] ERROR in ./node_modules/@ionic/angular/dist/fesm5.js 5827:23-43
[ng] "export 'defineCustomElements' was not found in '@ionic/core/loader'
[ng] ERROR in ./node_modules/@ionic/core/loader/index.es2017.mjs
[ng] Module not found: Error: Can't resolve '../dist/esm/loader.mjs' in '/Users/vtn2/ionic/quiz2/node_modules/@ionic/core/loader'
[ng] ERROR in ./node_modules/@ionic/core/loader/index.es2017.mjs
[ng] Module not found: Error: Can't resolve '../dist/esm/polyfills/index.js' in '/Users/vtn2/ionic/quiz2/node_modules/@ionic/core/loader'
[ng] ERROR in ./node_modules/@ionic/angular/dist/fesm5.js
[ng] Module not found: Error: Can't resolve '@ionic/core' in '/Users/vtn2/ionic/quiz2/node_modules/@ionic/angular/dist'

My setup is:

$ ionic info

Ionic:

   Ionic CLI                     : 5.2.3 (/usr/local/lib/node_modules/ionic)
   Ionic Framework               : @ionic/angular 4.7.2
   @angular-devkit/build-angular : 0.801.3
   @angular-devkit/schematics    : 8.1.3
   @angular/cli                  : 8.1.3
   @ionic/angular-toolkit        : 2.0.0

Utility:

   cordova-res : not installed
   native-run  : not installed

System:

   NodeJS : v10.16.0 (/usr/local/bin/node)
   npm    : 6.10.3
   OS     : macOS Mojave

Any idea what is happening or what I do to fix it? I did this exact same thing at the end of last week and it worked fine.

I discovered the problem. Somehow ionic start is installing @ionic/angular@4.7.2 which is not released yet! So, npm install @ionic/angular@4.7.1 fixed the problem.

Hope someone in charge is seeing this…

2 Likes