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

please support angular 12 #137

Closed
Silentdoer opened this issue Jul 21, 2021 · 12 comments
Closed

please support angular 12 #137

Silentdoer opened this issue Jul 21, 2021 · 12 comments
Assignees

Comments

@Silentdoer
Copy link

No description provided.

@SimonMcKinsey SimonMcKinsey self-assigned this Sep 13, 2021
@SimonMcKinsey
Copy link
Member

@Silentdoer Is there anything in particular that doesn't work for you?

@drowhunter
Copy link

npm ERR! Could not resolve dependency: npm ERR! peer @angular/common@"~11.1.1" from mobx-angular@4.3.0 npm ERR! node_modules/mobx-angular npm ERR! mobx-angular@"*" from the root project

@SimonMcKinsey
Copy link
Member

@drowhunter Can you share your package.json file?

@pauloantonelli
Copy link

i have the same problem with angular 12 :/

@SimonMcKinsey
Copy link
Member

Will upgrade to V13.
I'll check that V12 is supported as well.

@drowhunter
Copy link

@SimonTouitou

  "name": "hello-world-ang",
  "version": "0.0.0",
  "scripts": {
    "ng": "ng",
    "start": "ng serve",
    "build": "ng build",
    "watch": "ng build --watch --configuration development"
  },
  "private": true,
  "dependencies": {
    "@angular/animations": "~12.2.0",
    "@angular/common": "~12.2.0",
    "@angular/compiler": "~12.2.0",
    "@angular/core": "~12.2.0",
    "@angular/forms": "~12.2.0",
    "@angular/platform-browser": "~12.2.0",
    "@angular/platform-browser-dynamic": "~12.2.0",
    "@angular/router": "~12.2.0",
    "mobx": "6.3.2",
    "mobx-angular": "^4.3.0",
    "rxjs": "~6.6.0",
    "tslib": "^2.3.0",
    "zone.js": "~0.11.4"
  },
  "devDependencies": {
    "@angular-devkit/build-angular": "~12.2.4",
    "@angular/cli": "~12.2.4",
    "@angular/compiler-cli": "~12.2.0",
    "@types/node": "^12.11.1",
    "typescript": "~4.3.5"
  }
}

@drowhunter
Copy link

it would appear that mobx 4.3.0 is expecting angular 11 and getting twelve and freaking out

@SimonMcKinsey
Copy link
Member

@drowhunter @pauloantonelli @Silentdoer
Awaiting CR and extra clarifications for my PR: #145

@SimonMcKinsey
Copy link
Member

Merged.
Closing.

@Menyueru
Copy link

Menyueru commented Nov 8, 2021

Peer dependencies where left on ~11.1.1 so it is still giving the error

@SimonMcKinsey
Copy link
Member

@Menyueru Can you post your package.json?
Also, can you paste a snippet of your mobx usage?

@Menyueru
Copy link

@SimonTouitou I actually got it working fine with angular 12, but with npm when you try to update angular to any version that's not 11.1.1 you get the following error mentioned by @drowhunter

npm ERR! Could not resolve dependency: npm ERR! peer @angular/common@"~11.1.1" from mobx-angular@4.3.0 npm ERR! node_modules/mobx-angular npm ERR! mobx-angular@"*" from the root project

You can ignore this error with a --force flag and that's what I ended up doing but I do get the occasional warning when running npm telling me about this supposedly broken peer dependency
npm WARN mobx-angular@4.3.0 requires a peer of @angular/common@~11.1.1 but none is installed. You must install peer dependencies yourself. npm WARN mobx-angular@4.3.0 requires a peer of @angular/core@~11.1.1 but none is installed. You must install peer dependencies yourself.

I'm guessing this happens because of the following lines in projects/mobx-angular/package.json
"peerDependencies": { "@angular/common": "~11.1.1", "@angular/core": "~11.1.1", "mobx": ">=2", "tslib": "^2.0.0" },

Mind you version 4.3 actually works great with angular 12, couldn't get 4.4 to work properly as it was looking for some dependencies in angular that might have been added on angular 13 but I would need to try again since I had also messed up something else on Monday when I tried it.

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