uav4geo / GCPEditorPro

Amazingly fast and simple ground control points interface. ◎
https://gcp.uav4geo.com
Other
55 stars 17 forks source link

Npm install error #37

Open sbonaime opened 3 months ago

sbonaime commented 3 months ago

On my mac, I have the following errors after npm install


npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: gcp-editor-pro@1.3.0
npm ERR! Found: @angular/common@9.1.13
npm ERR! node_modules/@angular/common
npm ERR!   @angular/common@"~9.1.1" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer @angular/common@"^6.0.0-rc.0 || ^6.0.0" from ng-open-cv@0.3.1
npm ERR! node_modules/ng-open-cv
npm ERR!   ng-open-cv@"^0.3.1" 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!
npm ERR! For a full report see:
npm ERR! /Users/bonaime/.npm/_logs/2024-03-26T10_51_59_523Z-eresolve-report.txt```
renato-dias commented 2 months ago

Hey, I've stumbled upon the same problem I just wanted to run a simple test, so, I bypassed the dependency checks. Also, I had to install proj4 but not @types/proj4. I am using Node on version v18.20.2 and commit d78143c331

By order, these were the commands I had to run:

npm i --force
npm i proj4@2.5.0 --save --force
npm r @types/proj4 --force

Also, I've added "allowSyntheticDefaultImports": true under "angularCompilerOptions" on tsconfig.json

Then, to launch Angular, I had to append an extra NODE_OPTION, and the final command became: NODE_OPTIONS=--openssl-legacy-provider ng serve

sbonaime commented 2 months ago

It is more or less what I did here https://github.com/sbonaime/GCPEditorPro