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

TCCD won't install correctly `npm ERR! ERESOLVE could not resolve @angular/compiler@">=2.3.1 #371

Open
brunoais opened this issue Mar 28, 2024 · 4 comments

Comments

@brunoais
Copy link

While following the instructions for setting up (starting from clean again), npm install ends with this error.

git/repo/tuxedo-control-center$ npm install
npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR! 
npm ERR! While resolving: [email protected]
npm ERR! Found: @angular/[email protected]
npm ERR! node_modules/@angular/compiler
npm ERR!   @angular/compiler@"~10.2.5" from the root project
npm ERR!   peer @angular/compiler@"10.2.5" from @angular/[email protected]
npm ERR!   node_modules/@angular/compiler-cli
npm ERR!     dev @angular/compiler-cli@"~10.2.5" from the root project
npm ERR!     peer @angular/compiler-cli@"^10.0.0" from @angular-devkit/[email protected]
npm ERR!     node_modules/@angular-devkit/build-angular
npm ERR!       dev @angular-devkit/build-angular@"~0.1002.4" from the root project
npm ERR!     2 more (@angular/localize, @ngtools/webpack)
npm ERR!   2 more (@angular/localize, @angular/platform-browser-dynamic)
npm ERR! 
npm ERR! Could not resolve dependency:
npm ERR! peer @angular/compiler@">=2.3.1 <10.0.0 || >9.0.0-beta <10.0.0 || >9.1.0-beta <10.0.0 || >9.2.0-beta <10.0.0" from [email protected]
npm ERR! node_modules/codelyzer
npm ERR!   dev codelyzer@"^5.1.2" from the root project
npm ERR! 
npm ERR! Conflicting peer dependency: @angular/[email protected]
npm ERR! node_modules/@angular/compiler
npm ERR!   peer @angular/compiler@">=2.3.1 <10.0.0 || >9.0.0-beta <10.0.0 || >9.1.0-beta <10.0.0 || >9.2.0-beta <10.0.0" from [email protected]
npm ERR!   node_modules/codelyzer
npm ERR!     dev codelyzer@"^5.1.2" from the root project
npm ERR! 
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force, or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
npm ERR! 
npm ERR! See $HOME/.npm/eresolve-report.txt for a full report.

npm ERR! A complete log of this run can be found in:
npm ERR!     $HOME/.npm/_logs/2024-03-28T15_46_25_729Z-debug-0.log

(I replaced my home path with $HOME for privacy)

Did something break? Is it my system?

I'm running ubuntu 22.04.

@tuxedoder
Copy link
Contributor

tuxedoder commented Mar 28, 2024

Did you modify something or install versions manually? It seems to work for me and I am not sure why it happened. Have you tried to delete package-lock.json and node_modules? (The node folder will only exist if you ran the install command prior)

git clone https://github.com/tuxedocomputers/tuxedo-control-center
cd tuxedo-control-center
rm -rf ./node_modules/ package-lock.json && npm i

@brunoais
Copy link
Author

node_modules yes but not package-lock.json because package-lock.json is in the repository.

Doesn't solve. The only way I was able to progress was running npm install --force and that made it ignore whatever caused the "cannot resolve" error and progress.

After running npm run build and ending with success... I conclude that whatever it decided to do, it works now... At least, it compiles.

@brunoais
Copy link
Author

Seems like I can compile and run tccd but I can't run tcc

image

tuxedo-control-center$  npm run start

> [email protected] start
> electron ./dist/tuxedo-control-center

/GIT/tuxedo-control-center/node_modules/electron/index.js:17
    throw new Error('Electron failed to install correctly, please delete node_modules/electron and try installing again');
    ^

Error: Electron failed to install correctly, please delete node_modules/electron and try installing again
    at getElectronPath (/GIT/tuxedo-control-center/node_modules/electron/index.js:17:11)
    at Object.<anonymous> (/GIT/tuxedo-control-center/node_modules/electron/index.js:21:18)
    at Module._compile (internal/modules/cjs/loader.js:999:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)
    at Module.load (internal/modules/cjs/loader.js:863:32)
    at Function.Module._load (internal/modules/cjs/loader.js:708:14)
    at Module.require (internal/modules/cjs/loader.js:887:19)
    at require (internal/modules/cjs/helpers.js:74:18)
    at Object.<anonymous> (/GIT/tuxedo-control-center/node_modules/electron/cli.js:3:18)
    at Module._compile (internal/modules/cjs/loader.js:999:30)

Seems like the --force didn't help after all.

@tuxedoder
Copy link
Contributor

That error seems to happen if a wrong node version is used, it works fine with node 14. Make sure you have node 14. I like to use nvm to manage different versions.

nvm use 14
Now using node v14.21.3 (npm v6.14.18)
node --version
v14.21.3

BUILD SUCCESS
nvm use 16
Now using node v16.20.2 (npm v8.19.4)
node --version
v16.20.2

npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR! 
npm ERR! While resolving: [email protected]
npm ERR! Found: @angular/[email protected]
npm ERR! node_modules/@angular/compiler
npm ERR!   @angular/compiler@"~10.2.5" from the root project
npm ERR! 
npm ERR! Could not resolve dependency:
npm ERR! peer @angular/compiler@">=2.3.1 <10.0.0 || >9.0.0-beta <10.0.0 || >9.1.0-beta <10.0.0 || >9.2.0-beta <10.0.0" from [email protected]
npm ERR! node_modules/codelyzer
npm ERR!   dev codelyzer@"^5.1.2" from the root project
npm ERR! 
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force, or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.

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

2 participants