Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

failed to compile after 3.0.0 update #501

Closed
blondie63 opened this issue Mar 20, 2019 · 4 comments
Closed

failed to compile after 3.0.0 update #501

blondie63 opened this issue Mar 20, 2019 · 4 comments

Comments

@blondie63
Copy link

blondie63 commented Mar 20, 2019

I've a Ionic 4 working project with latest plugins (angular 7.2.10 etc etc), this is my package.json
"dependencies": {
"@angular/common": "^7.2.10",
"@angular/core": "^7.2.10",
"@angular/forms": "^7.2.10",
"@angular/http": "^7.2.10",
"@angular/platform-browser": "^7.2.10",
"@angular/platform-browser-dynamic": "^7.2.10",
"@angular/pwa": "^0.13.6",
"@angular/router": "^7.2.10",
"@angular/service-worker": "7.2.10",
"@capacitor/cli": "^1.0.0-beta.19",
"@capacitor/core": "1.0.0-beta.19",
"@ionic-native/core": "^5.3.0",
"@ionic-native/splash-screen": "^5.3.0",
"@ionic-native/status-bar": "^5.3.0",
"@ionic/angular": "^4.1.1",
"angular-pipes": "^9.0.2",
"cordova-android": "^8.0.0",
"cordova-ios": "5.0.0",
"cordova-plugin-device": "^2.0.2",
"cordova-plugin-ionic-keyboard": "^2.1.3",
"cordova-plugin-ionic-webview": "^4.0.0",
"cordova-plugin-splashscreen": "^5.0.2",
"cordova-plugin-statusbar": "^2.4.2",
"cordova-plugin-whitelist": "^1.3.3",
"core-js": "^3.0.0",
"dayjs": "1.8.10",
"google-libphonenumber": "^3.2.2",
"rxjs": "~6.4.0",
"zone.js": "~0.8.29"
},
"devDependencies": {
"@angular-devkit/architect": "~0.13.6",
"@angular-devkit/build-angular": "~0.13.6",
"@angular-devkit/core": "~7.3.6",
"@angular-devkit/schematics": "~7.3.6",
"@angular/cli": "~7.3.6",
"@angular/compiler": "~7.2.10",
"@angular/compiler-cli": "^7.2.10",
"@angular/language-service": "~7.2.10",
"@commitlint/cli": "^7.5.2",
"@commitlint/config-conventional": "^7.5.0",
"@ionic/angular-toolkit": "~1.4.1",
"@ionic/lab": "1.0.24",
"@types/node": "~11.11.4",
"codelyzer": "5.0.0-beta.1",
"husky": "^1.3.1",
"pre-commit": "^1.2.2",
"ts-node": "~8.0.3",
"tslint": "~5.14.0",
"typescript": "~3.2.4"

After upgrade to core-js 3.0.0 i've a failed to compile error:
[ng] ERROR in ./node_modules/@angular-devkit/build-angular/src/angular-cli-files/models/jit-polyfills.js
[ng] Module not found: Error: Can't resolve 'core-js/es7/reflect' in '/Users/mauro/Documents/_projects/Ionic Apps/Ionic4_tests/ionic4-full-starter-app-1.2/node_modules/@angular-devkit/build-angular/src/angular-cli-files/models'
[ng] ERROR in ./src/polyfills.ts
[ng] Module not found: Error: Can't resolve 'core-js/es7/reflect' in '/Users/mauro/Documents/_projects/Ionic Apps/Ionic4_tests/ionic4-full-starter-app-1.2/src'

Some help ?

@nicolo-ribaudo
Copy link
Contributor

I think that that dependency is importing core-js but it isn't specified in their dependencies.

@nicolo-ribaudo
Copy link
Contributor

nicolo-ribaudo commented Mar 20, 2019

Tracked at angular/angular-cli#13954, duplicate of #412

@blondie63
Copy link
Author

Really i've created my project with cmd like this:
ionic start corejs3-test tabs
And ionic add corejs as dependencie, i'm not using directly, so maybe you are right and this is a problem of Angular.. it's better to stay on core-js 2.6.5 untile Angular start to use v3.0.0
Do you agree?

@nicolo-ribaudo
Copy link
Contributor

The problem is not that angular doesn't use core-js@3: is that they are using core-js@2 without listing it in their dependencies. As soon as their fix that but, you can use core-js@3 in your project.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants