Failure to install Angular

Hello everybody,

Perhaps someone can guide me if I am not in the good forum.

After developing a few hours a project in Angular (with a lot of migration errors, that being said), I realized that the author of the project model, on CodeProject, has updated the model.

So, I downloaded the update, and extracted to a new folder in Visual Studio projects.

It appeared I first had to install Angular. Well, could be surprising, but I typed

npm -i @angular/cli

(and later tried with -g option)
and I had an error :

15708 error cb() never called!
15709 error This is an error with npm itself. Please report this error at:
15710 error <https://npm.community>

The log takes not far from 800 KB, do you want me to copy it here ?

I must precise that on existing projects, ng still works quite nice, but the new project must contain something that ng does not appreciate.

D:\Projects Visual Studio\Web\WeatherProject II 001\GlobalWeather\GlobalWeather\WeatherClient
19:01:52>npm install -g @angular/cli
npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated har-validator@5.1.5: this library is no longer supported
C:\Users\admin\AppData\Roaming\npm\ng -> C:\Users\admin\AppData\Roaming\npm\node_modules\@angular\cli\bin\ng

> @angular/cli@12.2.6 postinstall C:\Users\admin\AppData\Roaming\npm\node_modules\@angular\cli
> node ./bin/postinstall/script.js

+ @angular/cli@12.2.6
updated 1 package in 12.874s

D:\Projects Visual Studio\Web\WeatherProject II 001\GlobalWeather\GlobalWeather\WeatherClient
19:02:37>ng serve --o
An unhandled exception occurred: Cannot find module '@angular-devkit/build-angular/package.json'
Require stack:
- C:\Users\admin\AppData\Roaming\npm\node_modules\@angular\cli\node_modules\@angular-devkit\architect\node\node-modules-architect-host.js
- C:\Users\admin\AppData\Roaming\npm\node_modules\@angular\cli\node_modules\@angular-devkit\architect\node\index.js
- C:\Users\admin\AppData\Roaming\npm\node_modules\@angular\cli\models\architect-command.js
- C:\Users\admin\AppData\Roaming\npm\node_modules\@angular\cli\commands\serve-impl.js
- C:\Users\admin\AppData\Roaming\npm\node_modules\@angular\cli\node_modules\@angular-devkit\schematics\tools\export-ref.js
- C:\Users\admin\AppData\Roaming\npm\node_modules\@angular\cli\node_modules\@angular-devkit\schematics\tools\index.js
- C:\Users\admin\AppData\Roaming\npm\node_modules\@angular\cli\utilities\json-schema.js
- C:\Users\admin\AppData\Roaming\npm\node_modules\@angular\cli\models\command-runner.js
- C:\Users\admin\AppData\Roaming\npm\node_modules\@angular\cli\lib\cli\index.js
- C:\Users\admin\AppData\Roaming\npm\node_modules\@angular\cli\lib\init.js
- C:\Users\admin\AppData\Roaming\npm\node_modules\@angular\cli\bin\ng
See "C:\Users\admin\AppData\Local\Temp\ng-iDh7DG\angular-errors.log" for further details.


clean-install-test is much more verbose, it seems I had to do it on node-sass and jquery too.
I installed Python as I saw an error message on it several times.

I tried clean-install-test chrome, as clean-install-test systematically finished like this :

20 09 2021 01:09:55.740:INFO [karma-server]: Karma v3.1.4 server started at http://0.0.0.0:9876/
20 09 2021 01:09:55.748:INFO [launcher]: Launching browsers Chrome with concurrency unlimited
20 09 2021 01:09:55.755:INFO [launcher]: Starting browser Chrome
20 09 2021 01:10:08.153:WARN [karma]: No captured browser, open http://localhost:9876/
20 09 2021 01:10:55.769:WARN [launcher]: Chrome have not captured in 60000 ms, killing.
20 09 2021 01:10:57.782:WARN [launcher]: Chrome was not killed in 2000 ms, sending SIGKILL.
20 09 2021 01:10:59.793:WARN [launcher]: Chrome was not killed by SIGKILL in 2000

I am still at this point.

Perhaps this can bring some light, I sell “build failed with error 1” :

 1:07:14>npm clean-install-test jquery
npm WARN prepare removing existing node_modules/ before installation

> fsevents@1.2.4 install D:\Projects Visual Studio\Web\WeatherProject II 001\GlobalWeather\GlobalWeather\WeatherClient\node_modules\fsevents
> node install


> fsevents@1.2.13 install D:\Projects Visual Studio\Web\WeatherProject II 001\GlobalWeather\GlobalWeather\WeatherClient\node_modules\watchpack-chokidar2\node_modules\fsevents
> node install.js


Skipping 'fsevents' build as platform win32 is not supported

> node-sass@4.10.0 install D:\Projects Visual Studio\Web\WeatherProject II 001\GlobalWeather\GlobalWeather\WeatherClient\node_modules\@angular-devkit\build-angular\node_modules\node-sass
> node scripts/install.js

Downloading binary from https://github.com/sass/node-sass/releases/download/v4.10.0/win32-x64-83_binding.node
Cannot download "https://github.com/sass/node-sass/releases/download/v4.10.0/win32-x64-83_binding.node":

HTTP error 404 Not Found

Hint: If github.com is not accessible in your location
      try setting a proxy via HTTP_PROXY, e.g.

      export HTTP_PROXY=http://example.com:1234

or configure npm proxy via

      npm config set proxy http://example.com:8080

> node-sass@4.10.0 postinstall D:\Projects Visual Studio\Web\WeatherProject II 001\GlobalWeather\GlobalWeather\WeatherClient\node_modules\@angular-devkit\build-angular\node_modules\node-sass
> node scripts/build.js

Building: C:\Program Files\nodejs\node.exe D:\Projects Visual Studio\Web\WeatherProject II 001\GlobalWeather\GlobalWeather\WeatherClient\node_modules\@angular-devkit\build-angular\node_modules\node-gyp\bin\node-gyp.js rebuild --verbose --libsass_ext= --libsass_cflags= --libsass_ldflags= --libsass_library=
gyp info it worked if it ends with ok
gyp verb cli [
gyp verb cli   'C:\\Program Files\\nodejs\\node.exe',
gyp verb cli   'D:\\Projects Visual Studio\\Web\\WeatherProject II 001\\GlobalWeather\\GlobalWeather\\WeatherClient\\node_modules\\@angular-devkit\\build-angular\\node_modules\\node-gyp\\bin\\node-gyp.js',
gyp verb cli   'rebuild',
gyp verb cli   '--verbose',
gyp verb cli   '--libsass_ext=',
gyp verb cli   '--libsass_cflags=',
gyp verb cli   '--libsass_ldflags=',
gyp verb cli   '--libsass_library='
gyp verb cli ]
gyp info using node-gyp@3.8.0
gyp info using node@14.16.0 | win32 | x64
gyp verb command rebuild []
gyp verb command clean []
gyp verb clean removing "build" directory
gyp verb command configure []
gyp verb check python checking for Python executable "python2" in the PATH
gyp verb `which` failed Error: not found: python2
gyp verb `which` failed     at getNotFoundError (D:\Projects Visual Studio\Web\WeatherProject II 001\GlobalWeather\GlobalWeather\WeatherClient\node_modules\which\which.js:13:12)
gyp verb `which` failed     at F (D:\Projects Visual Studio\Web\WeatherProject II 001\GlobalWeather\GlobalWeather\WeatherClient\node_modules\which\which.js:68:19)
gyp verb `which` failed     at E (D:\Projects Visual Studio\Web\WeatherProject II 001\GlobalWeather\GlobalWeather\WeatherClient\node_modules\which\which.js:80:29)
gyp verb `which` failed     at D:\Projects Visual Studio\Web\WeatherProject II 001\GlobalWeather\GlobalWeather\WeatherClient\node_modules\which\which.js:89:16
gyp verb `which` failed     at D:\Projects Visual Studio\Web\WeatherProject II 001\GlobalWeather\GlobalWeather\WeatherClient\node_modules\isexe\index.js:42:5
gyp verb `which` failed     at D:\Projects Visual Studio\Web\WeatherProject II 001\GlobalWeather\GlobalWeather\WeatherClient\node_modules\isexe\windows.js:36:5
gyp verb `which` failed     at FSReqCallback.oncomplete (fs.js:183:21)
gyp verb `which` failed  python2 Error: not found: python2
gyp verb `which` failed     at getNotFoundError (D:\Projects Visual Studio\Web\WeatherProject II 001\GlobalWeather\GlobalWeather\WeatherClient\node_modules\which\which.js:13:12)
gyp verb `which` failed     at F (D:\Projects Visual Studio\Web\WeatherProject II 001\GlobalWeather\GlobalWeather\WeatherClient\node_modules\which\which.js:68:19)
gyp verb `which` failed     at E (D:\Projects Visual Studio\Web\WeatherProject II 001\GlobalWeather\GlobalWeather\WeatherClient\node_modules\which\which.js:80:29)
gyp verb `which` failed     at D:\Projects Visual Studio\Web\WeatherProject II 001\GlobalWeather\GlobalWeather\WeatherClient\node_modules\which\which.js:89:16
gyp verb `which` failed     at D:\Projects Visual Studio\Web\WeatherProject II 001\GlobalWeather\GlobalWeather\WeatherClient\node_modules\isexe\index.js:42:5
gyp verb `which` failed     at D:\Projects Visual Studio\Web\WeatherProject II 001\GlobalWeather\GlobalWeather\WeatherClient\node_modules\isexe\windows.js:36:5
gyp verb `which` failed     at FSReqCallback.oncomplete (fs.js:183:21) {
gyp verb `which` failed   code: 'ENOENT'
gyp verb `which` failed }
gyp verb check python checking for Python executable "python" in the PATH
gyp verb `which` succeeded python C:\Python39\python.EXE
gyp ERR! configure error
gyp ERR! stack Error: Command failed: C:\Python39\python.EXE -c import sys; print "%s.%s.%s" % sys.version_info[:3];
gyp ERR! stack   File "<string>", line 1
gyp ERR! stack     import sys; print "%s.%s.%s" % sys.version_info[:3];
gyp ERR! stack                       ^
gyp ERR! stack SyntaxError: invalid syntax
gyp ERR! stack
gyp ERR! stack     at ChildProcess.exithandler (child_process.js:308:12)
gyp ERR! stack     at ChildProcess.emit (events.js:315:20)
gyp ERR! stack     at maybeClose (internal/child_process.js:1048:16)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:288:5)
gyp ERR! System Windows_NT 10.0.19043
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "D:\\Projects Visual Studio\\Web\\WeatherProject II 001\\GlobalWeather\\GlobalWeather\\WeatherClient\\node_modules\\@angular-devkit\\build-angular\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library="
gyp ERR! cwd D:\Projects Visual Studio\Web\WeatherProject II 001\GlobalWeather\GlobalWeather\WeatherClient\node_modules\@angular-devkit\build-angular\node_modules\node-sass
gyp ERR! node -v v14.16.0
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
Build failed with error code: 1

> node-sass@6.0.1 install D:\Projects Visual Studio\Web\WeatherProject II 001\GlobalWeather\GlobalWeather\WeatherClient\node_modules\node-sass
> node scripts/install.js

Cached binary found at C:\Users\admin\AppData\Roaming\npm-cache\_cacache\node-sass\6.0.1\win32-x64-83_binding.node

> node-sass@6.0.1 postinstall D:\Projects Visual Studio\Web\WeatherProject II 001\GlobalWeather\GlobalWeather\WeatherClient\node_modules\node-sass
> node scripts/build.js

Binary found at D:\Projects Visual Studio\Web\WeatherProject II 001\GlobalWeather\GlobalWeather\WeatherClient\node_modules\node-sass\vendor\win32-x64-83\binding.node
Testing binary
Binary is fine
added 1255 packages in 133.326s

> weather-client@0.0.0 test D:\Projects Visual Studio\Web\WeatherProject II 001\GlobalWeather\GlobalWeather\WeatherClient

Erratum:
It seems I am not able to edit any more, instead of “sell”, please read “see”.

So, clearly this thread is not the solution.
What must I do ?
When I type the “ng” command it returns immediately with no answer, event on existing projects.
Do you mean I must reinstall my system ?