rodgc/ngx-socket-io

No compatible version for angular 16.2.12

Fr3shlian opened this issue · 7 comments

I am using angular version 16.2.12 in my project and I am trying to install Socket-io versions 4.5 or 4.5.1 but neither seems to be working despite package version 4.5 requiring angular 16. Whenever I try to install socket-io or specifically versions 4.5 or 4.5.1 it either tells me I'm requesting a package version that doesn't exist or refers to socket version 4.6.1 which requires angular version 17.

Could you post the full error logs?

2023-11-29T13_51_25_898Z-debug-0.log
This is the log for when I try npm install
2023-11-29T13_59_06_728Z-debug-0.log
This is what it says if I try to install specifically version 4.5.1

Your .log files open a bit weird on my machine, could you post them as pure text formatted code blocks?

Still opens with weird characters right where the useful info is :) could you post the text like this:


0 verbose cli C:\Program Files\nodejs\node.exe C:\Users\jsteu\AppData\Roaming\npm\node_modules\npm\bin\npm-cli.js
1 info using npm@10.2.4
2 info using node@v20.10.0
3 timing npm:load:whichnode Completed in 1ms
4 timing config:load:defaults Completed in 1ms
5 timing config:load:file:C:\Users\jsteu\AppData\Roaming\npm\node_modules\npm\npmrc Completed in 7ms
6 timing config:load:builtin Completed in 7ms
7 timing config:load:cli Completed in 1ms
8 timing config:load:env Completed in 1ms
9 timing config:load:file:C:\Schule\4BHIF\SYP\HAGE\Projekt\Edumix\edumix-master\edumix\.npmrc Completed in 1ms
10 timing config:load:project Completed in 1ms
11 timing config:load:file:C:\Users\jsteu\.npmrc Completed in 0ms
12 timing config:load:user Completed in 0ms
13 timing config:load:file:C:\Users\jsteu\AppData\Roaming\npm\etc\npmrc Completed in 0ms
14 timing config:load:global Completed in 0ms
15 timing config:load:setEnvs Completed in 1ms
16 timing config:load Completed in 12ms
17 timing npm:load:configload Completed in 12ms
18 timing config:load:flatten Completed in 2ms
19 timing npm:load:mkdirpcache Completed in 0ms
20 timing npm:load:mkdirplogs Completed in 0ms
21 verbose title npm install
22 verbose argv "install"
23 timing npm:load:setTitle Completed in 0ms
24 timing npm:load:display Completed in 1ms
25 verbose logfile logs-max:10 dir:C:\Users\jsteu\AppData\Local\npm-cache\_logs\2023-11-29T13_51_25_898Z-
26 verbose logfile C:\Users\jsteu\AppData\Local\npm-cache\_logs\2023-11-29T13_51_25_898Z-debug-0.log
27 timing npm:load:logFile Completed in 50ms
28 timing npm:load:timers Completed in 0ms
29 timing npm:load:configScope Completed in 0ms
30 timing npm:load Completed in 93ms
31 timing arborist:ctor Completed in 1ms
32 silly logfile start cleaning logs, removing 2 files
33 timing arborist:ctor Completed in 0ms
34 silly logfile done cleaning log files
35 timing idealTree:init Completed in 12ms
36 timing idealTree:userRequests Completed in 0ms
37 silly idealTree buildDeps
38 silly fetch manifest @angular/animations@^16.2.12
39 http fetch GET 200 https://registry.npmjs.org/@angular%2fanimations 408ms (cache revalidated)
40 silly fetch manifest @angular/core@^16.2.12
41 http fetch GET 200 https://registry.npmjs.org/@angular%2fcore 88ms (cache revalidated)
42 silly fetch manifest rxjs@~7.5.0
43 http fetch GET 200 https://registry.npmjs.org/rxjs 89ms (cache revalidated)
44 silly fetch manifest zone.js@~0.13.3
45 http fetch GET 200 https://registry.npmjs.org/zone.js 87ms (cache revalidated)
46 silly fetch manifest @angular/cdk@^16.2.12
47 http fetch GET 200 https://registry.npmjs.org/@angular%2fcdk 173ms (cache revalidated)
48 silly fetch manifest @angular/common@^16.2.12
49 http fetch GET 200 https://registry.npmjs.org/@angular%2fcommon 141ms (cache revalidated)
50 silly fetch manifest @angular/compiler@^16.2.12
51 http fetch GET 200 https://registry.npmjs.org/@angular%2fcompiler 88ms (cache revalidated)
52 silly fetch manifest @angular/forms@^16.2.12
53 http fetch GET 200 https://registry.npmjs.org/@angular%2fforms 107ms (cache revalidated)
54 silly fetch manifest @angular/platform-browser@^16.2.12
55 http fetch GET 200 https://registry.npmjs.org/@angular%2fplatform-browser 107ms (cache revalidated)
56 silly fetch manifest @angular/material@^16.2.12
57 http fetch GET 200 https://registry.npmjs.org/@angular%2fmaterial 88ms (cache revalidated)
58 silly fetch manifest @angular/platform-browser-dynamic@^16.2.12
59 http fetch GET 200 https://registry.npmjs.org/@angular%2fplatform-browser-dynamic 98ms (cache revalidated)
60 silly fetch manifest @angular/router@^16.2.12
61 http fetch GET 200 https://registry.npmjs.org/@angular%2frouter 92ms (cache revalidated)
62 silly fetch manifest @angular/youtube-player@^16.2.12
63 http fetch GET 200 https://registry.npmjs.org/@angular%2fyoutube-player 1658ms (cache revalidated)
64 silly fetch manifest @fortawesome/angular-fontawesome@^0.13.0
65 http fetch GET 200 https://registry.npmjs.org/@fortawesome%2fangular-fontawesome 122ms (cache revalidated)
66 silly fetch manifest @fortawesome/fontawesome-svg-core@^6.2.0
67 http fetch GET 200 https://registry.npmjs.org/@fortawesome%2ffontawesome-svg-core 255ms (cache updated)
68 silly fetch manifest @fortawesome/fontawesome-free@^6.2.1
69 http fetch GET 200 https://registry.npmjs.org/@fortawesome%2ffontawesome-free 241ms (cache updated)
70 silly fetch manifest @fortawesome/free-brands-svg-icons@^6.2.1
71 http fetch GET 200 https://registry.npmjs.org/@fortawesome%2ffree-brands-svg-icons 571ms (cache updated)
72 silly fetch manifest @fortawesome/free-regular-svg-icons@^6.2.1
73 http fetch GET 200 https://registry.npmjs.org/@fortawesome%2ffree-regular-svg-icons 1869ms (cache updated)
74 silly fetch manifest @fortawesome/free-solid-svg-icons@^6.2.0
75 http fetch GET 200 https://registry.npmjs.org/@fortawesome%2ffree-solid-svg-icons 1848ms (cache updated)
76 silly fetch manifest @lottiefiles/lottie-player@^1.6.3
77 http fetch GET 200 https://registry.npmjs.org/@lottiefiles%2flottie-player 572ms (cache revalidated)
78 silly fetch manifest @ng-bootstrap/ng-bootstrap@^16.2.0
79 http fetch GET 200 https://registry.npmjs.org/@ng-bootstrap%2fng-bootstrap 870ms (cache revalidated)
80 silly fetch manifest @popperjs/core@^2.11.6
81 http fetch GET 200 https://registry.npmjs.org/@popperjs%2fcore 142ms (cache revalidated)
82 silly fetch manifest @types/socket.io-client@^3.0.0
83 http fetch GET 200 https://registry.npmjs.org/@types%2fsocket.io-client 1949ms (cache revalidated)
84 silly fetch manifest angular-animations@^0.11.0
85 http fetch GET 200 https://registry.npmjs.org/angular-animations 101ms (cache revalidated)
86 silly fetch manifest bootstrap@^5.3.2
87 http fetch GET 200 https://registry.npmjs.org/bootstrap 87ms (cache revalidated)
88 silly fetch manifest codemirror@^5.65.11
89 http fetch GET 200 https://registry.npmjs.org/codemirror 282ms (cache revalidated)
90 silly fetch manifest font-awesome@^4.7.0
91 http fetch GET 200 https://registry.npmjs.org/font-awesome 886ms (cache revalidated)
92 silly fetch manifest lottie-web@^5.12.2
93 http fetch GET 200 https://registry.npmjs.org/lottie-web 1075ms (cache revalidated)
94 silly fetch manifest mdb-angular-ui-kit@^5.1.0
95 http fetch GET 200 https://registry.npmjs.org/mdb-angular-ui-kit 938ms (cache revalidated)
96 silly fetch manifest ng-lottie@^0.3.2
97 http fetch GET 200 https://registry.npmjs.org/ng-lottie 373ms (cache revalidated)
98 silly fetch manifest ngx-highlightjs@^8.0.0
99 http fetch GET 200 https://registry.npmjs.org/ngx-highlightjs 75ms (cache revalidated)
100 silly fetch manifest ngx-lottie@^10.0.0
101 http fetch GET 200 https://registry.npmjs.org/ngx-lottie 885ms (cache revalidated)
102 silly fetch manifest ngx-socket-io@^4.5.1
103 http fetch GET 200 https://registry.npmjs.org/ngx-socket-io 825ms (cache revalidated)
104 silly fetch manifest @angular/common@^17.0.0
105 timing idealTree Completed in 17477ms
106 timing command:install Completed in 17491ms
107 verbose stack Error: unable to resolve dependency tree
107 verbose stack     at #failPeerConflict (C:\Users\jsteu\AppData\Roaming\npm\node_modules\npm\node_modules\@npmcli\arborist\lib\arborist\build-ideal-tree.js:1376:25)
107 verbose stack     at #loadPeerSet (C:\Users\jsteu\AppData\Roaming\npm\node_modules\npm\node_modules\@npmcli\arborist\lib\arborist\build-ideal-tree.js:1342:33)
107 verbose stack     at async #buildDepStep (C:\Users\jsteu\AppData\Roaming\npm\node_modules\npm\node_modules\@npmcli\arborist\lib\arborist\build-ideal-tree.js:917:11)
107 verbose stack     at async Arborist.buildIdealTree (C:\Users\jsteu\AppData\Roaming\npm\node_modules\npm\node_modules\@npmcli\arborist\lib\arborist\build-ideal-tree.js:196:7)
107 verbose stack     at async Promise.all (index 1)
107 verbose stack     at async Arborist.reify (C:\Users\jsteu\AppData\Roaming\npm\node_modules\npm\node_modules\@npmcli\arborist\lib\arborist\reify.js:159:5)
107 verbose stack     at async Install.exec (C:\Users\jsteu\AppData\Roaming\npm\node_modules\npm\lib\commands\install.js:152:5)
107 verbose stack     at async module.exports (C:\Users\jsteu\AppData\Roaming\npm\node_modules\npm\lib\cli-entry.js:61:5)
108 verbose cwd C:\Schule\4BHIF\SYP\HAGE\Projekt\Edumix\edumix-master\edumix
109 verbose Windows_NT 10.0.22621
110 verbose node v20.10.0
111 verbose npm  v10.2.4
112 error code ERESOLVE
113 error ERESOLVE unable to resolve dependency tree
114 error
115 error While resolving: �[1medumix�[22m@�[1m0.0.0�[22m
115 error Found: �[1m@angular/common�[22m@�[1m16.2.12�[22m�[2m�[22m
115 error �[2mnode_modules/@angular/common�[22m
115 error   �[1m@angular/common�[22m@"�[1m^16.2.12�[22m" from the root project
115 error
115 error Could not resolve dependency:
115 error �[35mpeer�[39m �[1m@angular/common�[22m@"�[1m^17.0.0�[22m" from �[1mngx-socket-io�[22m@�[1m4.6.1�[22m�[2m�[22m
115 error �[2mnode_modules/ngx-socket-io�[22m
115 error   �[1mngx-socket-io�[22m@"�[1m^4.5.1�[22m" from the root project
115 error
115 error Fix the upstream dependency conflict, or retry
115 error this command with --force or --legacy-peer-deps
115 error to accept an incorrect (and potentially broken) dependency resolution.
116 error
116 error
116 error For a full report see:
116 error C:\Users\jsteu\AppData\Local\npm-cache\_logs\2023-11-29T13_51_25_898Z-eresolve-report.txt
117 verbose exit 1
118 timing npm Completed in 17883ms
119 verbose unfinished npm timer reify 1701265886272
120 verbose unfinished npm timer reify:loadTrees 1701265886281
121 verbose unfinished npm timer idealTree:buildDeps 1701265886294
122 verbose unfinished npm timer idealTree:#root 1701265886295
123 verbose code 1
124 error A complete log of this run can be found in: C:\Users\jsteu\AppData\Local\npm-cache\_logs\2023-11-29T13_51_25_898Z-debug-0.log

# npm resolution error report

While resolving: edumix@0.0.0
Found: @angular/common@16.2.12
node_modules/@angular/common
  @angular/common@"^16.2.12" from the root project

Could not resolve dependency:
peer @angular/common@"^17.0.0" from ngx-socket-io@4.6.1
node_modules/ngx-socket-io
  ngx-socket-io@"^4.5.1" from the root project

Fix the upstream dependency conflict, or retry
this command with --force or --legacy-peer-deps
to accept an incorrect (and potentially broken) dependency resolution.

I don't know why those symbols showed up. These are the dependencies of my package.json by the way. I already tried deleting my node_modules and package-lock, as well as deleting npm cache.

"dependencies": {
    "@angular/animations": "^16.2.12",
    "@angular/cdk": "^16.2.12",
    "@angular/common": "^16.2.12",
    "@angular/compiler": "^16.2.12",
    "@angular/core": "^16.2.12",
    "@angular/forms": "^16.2.12",
    "@angular/material": "^16.2.12",
    "@angular/platform-browser": "^16.2.12",
    "@angular/platform-browser-dynamic": "^16.2.12",
    "@angular/router": "^16.2.12",
    "@angular/youtube-player": "^16.2.12",
    "@fortawesome/angular-fontawesome": "^0.13.0",
    "@fortawesome/fontawesome-free": "^6.2.1",
    "@fortawesome/fontawesome-svg-core": "^6.2.0",
    "@fortawesome/free-brands-svg-icons": "^6.2.1",
    "@fortawesome/free-regular-svg-icons": "^6.2.1",
    "@fortawesome/free-solid-svg-icons": "^6.2.0",
    "@lottiefiles/lottie-player": "^1.6.3",
    "@ng-bootstrap/ng-bootstrap": "^16.2.0",
    "@popperjs/core": "^2.11.6",
    "@types/socket.io-client": "^3.0.0",
    "angular-animations": "^0.11.0",
    "bootstrap": "^5.3.2",
    "codemirror": "^5.65.11",
    "font-awesome": "^4.7.0",
    "lottie-web": "^5.12.2",
    "mdb-angular-ui-kit": "^5.1.0",
    "ng-lottie": "^0.3.2",
    "ngx-highlightjs": "^8.0.0",
    "ngx-lottie": "^10.0.0",
    "ngx-socket-io": "^4.5.1",
    "read-excel-file": "^5.5.3",
    "rxjs": "~7.5.0",
    "socket.io-client": "^4.5.4",
    "tslib": "^2.3.0",
    "webuntis": "^2.0.3",
    "write-file": "^1.0.0",
    "write-json-file": "^5.0.0",
    "xls-parser": "^3.1.0",
    "xlsx": "^0.18.5",
    "zone.js": "~0.13.3"
  },
  "devDependencies": {
    "@angular-devkit/build-angular": "^16.2.12",
    "@angular/cli": "~16.2.12",
    "@angular/compiler-cli": "^16.2.12",
    "@types/jasmine": "~4.3.0",
    "jasmine-core": "~4.3.0",
    "karma": "~6.4.0",
    "karma-chrome-launcher": "~3.1.0",
    "karma-coverage": "~2.2.0",
    "karma-jasmine": "~5.1.0",
    "karma-jasmine-html-reporter": "~2.0.0",
    "typescript": "~5.1.6"
  }

Remove the ^ from these version specifiers:

"dependencies": {
    "ngx-socket-io": "4.5.1",
    "socket.io-client": "4.5.4",
  },

The ^ means anything between this version and the next major version, which will allow NPM to install 4.6.1, which will clash with your peer Angular dependency. Can you try npm install ngx-socket-io@4.5.1?

This package does not follow semantic versioning, so you have to pay extra attention to which Angular, SocketIO, and ngx-socket-io versions you let npm install. Check this table: https://github.com/rodgc/ngx-socket-io#install

Feel free to reopen if this didn't solve your issue :)