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

An unhandled exception occurred: context.getProjectMetadata is not a function #215

Open
koczka opened this issue Feb 25, 2020 · 6 comments

Comments

@koczka
Copy link

koczka commented Feb 25, 2020

I get this error message, when I try to run my ionic app in the simulator.

An unhandled exception occurred: context.getProjectMetadata is not a function

The command I'm using to run my project (works fine on angular 8, and angular toolkit 2.1)

ionic cordova run ios --livereload --target '...'


Ionic info

`Ionic:

Ionic CLI : 6.1.0 (/Users/user/.nvm/versions/node/v10.19.0/lib/node_modules/@ionic/cli)
Ionic Framework : @ionic/angular 5.0.1
@angular-devkit/build-angular : 0.900.3
@angular-devkit/schematics : 9.0.3
@angular/cli : 9.0.3
@ionic/angular-toolkit : 2.2.0

Cordova:

Cordova CLI : 9.0.0 ([email protected])
Cordova Platforms : ios 5.1.1
Cordova Plugins : cordova-plugin-ionic-webview 4.1.3, (and 14 other plugins)

Utility:

cordova-res : not installed
native-run : 0.3.0

System:

ios-deploy : 1.10.0
ios-sim : 8.0.2
NodeJS : v10.19.0 (/Users/user/.nvm/versions/node/v10.19.0/bin/node)
npm : 6.13.7
OS : macOS Catalina
Xcode : Xcode 11.3.1 Build version 11C504 `


ng version

`Angular CLI: 9.0.3
Node: 10.19.0
OS: darwin x64

Angular: 9.0.2
... common, compiler, compiler-cli, core, forms
... language-service, platform-browser, platform-browser-dynamic
... router
Ivy Workspace: Yes`

@dopplerDistortion
Copy link

dopplerDistortion commented Feb 27, 2020

Experienced the same issue today. Check your angular package versions in your package.json. For Example mine was like this

"dependencies": {
"@angular/animations": "^9.0.2",
"@angular/common": "^9.0.2",
"@angular/compiler": "^9.0.2",
"@angular/core": "^9.0.2",
"@angular/forms": "^9.0.2",
"@angular/platform-browser": "^9.0.2",
"@angular/platform-browser-dynamic": "^9.0.2",
"@angular/router": "^9.0.2",
...
},
"devDependencies": {
"@angular-devkit/architect": "0.803.14",
"@angular-devkit/build-angular": "0.900.3",
"@angular-devkit/core": "9.0.3",
"@angular-devkit/schematics": "9.0.3",
"@angular/cli": "9.0.2",
"@angular/compiler-cli": "9.0.2",
"@angular/language-service": "9.0.2",

Then I changed them like this after that my problem is solved

"dependencies": {
"@angular/animations": "^9.0.2",
"@angular/common": "^9.0.2",
"@angular/compiler": "^9.0.2",
"@angular/core": "^9.0.2",
"@angular/forms": "^9.0.2",
"@angular/platform-browser": "^9.0.2",
"@angular/platform-browser-dynamic": "^9.0.2",
"@angular/router": "^9.0.2",
...
},
"devDependencies": {
"@angular-devkit/architect": "0.900.2",
"@angular-devkit/build-angular": "0.900.2",
"@angular-devkit/core": "9.0.2",
"@angular-devkit/schematics": "9.0.2",
"@angular/cli": "9.0.2",
"@angular/compiler-cli": "9.0.2",
"@angular/language-service": "9.0.2",

At first I tried variants of 9.0.3 and 0.900.3 but I ecnounted a flattenedMap error. So I changed it to 9.0.2 and 0.900.2 variants. fyi

@koczka
Copy link
Author

koczka commented Feb 28, 2020

Yeah, that problem gone away, but I still cannot load the project properly, I always get "Cannot Get /" error now

@dopplerDistortion
Copy link

Yeah, that problem gone away, but I still cannot load the project properly, I always get "Cannot Get /" error now

Please provide more detailed logs so we can help you.

@prjcontrol
Copy link

This solved it for me:
npm install @angular-devkit/architect@latest
npm install @angular-devkit/build-angular@latest

@gleysonlf
Copy link

Thank you @prjcontrol!

This solved it for me:
npm install @angular-devkit/architect@latest
npm install @angular-devkit/build-angular@latest

@sumitdeyonline
Copy link

This solved it for me as well

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

No branches or pull requests

5 participants