Can't start Ionic App using "ionic serve" on Browser after packages update


#1

Hi there,

I’m trying to start ionic on browser using “ionic serve --l” but after simulation start I’m getting this error after I have updated some outdated packages:

undefined is not an object (evaluating ‘WEBPACK_IMPORTED_MODULE_0__angular_core[“ɵreflector”].reflectionCapabilities = new WEBPACK_IMPORTED_MODULE_0__angular_core"_42" /* ɵReflectionCapabilities */’)

What can be the problem?


Npm WARN optional SKIPPING OPTIONAL DEPENDENCY
#2

Try deleting your node_modules directory, then:

npm install
ionic serve

#3

@robinyo I’ve tried but I’m still having the same error. However, at the end of rpm install I get this WARNING:

npm WARN @ionic-native/app-rate@4.7.0 requires a peer of @ionic-native/core@^4.2.0 but none was installed.
npm WARN @angular/platform-browser-dynamic@4.1.3 requires a peer of @angular/core@4.1.3 but none was installed.
npm WARN @ionic-native/call-number@4.7.0 requires a peer of @ionic-native/core@^4.2.0 but none was installed.
npm WARN @angular/compiler-cli@4.1.3 requires a peer of @angular/core@4.1.3 but none was installed.
npm WARN @angular/http@4.4.7 requires a peer of @angular/platform-browser@4.4.7 but none was installed.
npm WARN @angular/common@4.1.3 requires a peer of @angular/core@4.1.3 but none was installed.
npm WARN @angular/platform-browser@4.1.3 requires a peer of @angular/core@4.1.3 but none was installed.
npm WARN @angular/forms@4.1.3 requires a peer of @angular/core@4.1.3 but none was installed.
npm WARN @angular/compiler@4.1.3 requires a peer of @angular/core@4.1.3 but none was installed.
npm WARN @ionic-native/camera@4.7.0 requires a peer of @ionic-native/core@^4.2.0 but none was installed.
npm WARN @ionic-native/google-analytics@4.7.0 requires a peer of @ionic-native/core@^4.2.0 but none was installed.
npm WARN @ionic-native/globalization@4.7.0 requires a peer of @ionic-native/core@^4.2.0 but none was installed.
npm WARN @ionic-native/in-app-browser@4.7.0 requires a peer of @ionic-native/core@^4.2.0 but none was installed.
npm WARN @ionic-native/network@4.7.0 requires a peer of @ionic-native/core@^4.2.0 but none was installed.
npm WARN @ionic-native/onesignal@4.7.0 requires a peer of @ionic-native/core@^4.2.0 but none was installed.
npm WARN @ionic-native/google-maps@4.8.2 requires a peer of @ionic-native/core@^4.2.0 but none was installed.
npm WARN ionic-angular@3.6.0 requires a peer of @angular/core@4.1.3 but none was installed.
npm WARN ionic-angular@3.6.0 requires a peer of @angular/http@4.1.3 but none was installed.

Maybe the problem could be here?


#4

Looks like you have a lot of peer dependency issues to address :slight_smile:


#5

@robinyo please can you suggest me how to solve this situation? I’m stuck at this point :frowning:


#6

Sort out all your peer dependency issues. Then work to remove all your warnings and/or errors.

See: https://stackoverflow.com/questions/48626005/how-do-i-deal-with-installing-peer-dependencies-in-angular-cli/48627003