Failing to run an existing project

124 Views Asked by At

I am starting with section 6 of Google's Tour of Heroes : "Get data from a server".

It seems that messages said I succeeded with installing InMemoryDataService and HttpClientInMemoryWebApiModule, which was much more difficult on another machine a few years ago (this one has 64 GB memory, possibly it helps). Nevertheless, the following calls for carefulness.

A problem arises when trying to execute : "Error: Schema validation failed with the following errors: Data path "" must have required property 'browserTarget'."

Did I skip any step?

If somebody has a solution for this I am interested, but threads were opened on that topic three years ago, and still not closed, so I tried something else that should occasionnate no problem : in order to operate a comparison with something that works I downloaded toh-pt6 at the beginning of the section, and this time when trying to execute I was said that it is impossible to start debugging. I am invited to verify that the project is the default project of the solution, which is the case, and then to verify the options of the project.

I tried to run npm install myself, but it answered this:

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/common
npm ERR!   @angular/common@"17.0.0" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer @angular/common@"^16.0.0" from [email protected]
npm ERR! node_modules/angular-in-memory-web-api
npm ERR!   angular-in-memory-web-api@"~0.16.0" 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! C:\Users\User\AppData\Local\npm-cache\_logs\2023-11-30T12_17_35_795Z-eresolve-report.txt

I noticed that the online version took more than half an hour to build, and still did not succeed, unless I was too impatient? Does anybody have any suggestion?


Essentially the log repeats the same information, and adds: "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 presume I am not the first one to get through this section, so perhaps somebody has an opinion about whether this force option is a good idea.

0

There are 0 best solutions below