'I can't install and run my Project located in GitHub repository with npm install

I installed the project I use ReactJs on my computer via GitHub, but when I use the npm install command for dependencies, I get python-related errors even though my project is not related to python.

Project

Errors

The error log shows a file occured while trying to download node-v16.14.2-headers.tar.gz from https://nodejs.org :

npm ERR! gyp http GET https://nodejs.org/download/release/v16.14.2/node-v16.14.2-headers.tar.gz
npm ERR! gyp WARN install got an error, rolling back install
npm ERR! gyp verb command remove [ '16.14.2' ]
npm ERR! gyp verb remove using node-gyp dir: C:\Users\oguzhan.duran\AppData\Local\node-gyp\Cache
npm ERR! gyp verb remove removing target version: 16.14.2
npm ERR! gyp verb remove removing development files for version: 16.14.2
npm ERR! gyp ERR! configure error
npm ERR! gyp ERR! stack FetchError: request to https://nodejs.org/download/release/v16.14.2/node-v16.14.2-headers.tar.gz failed, reason: self signed certificate in certificate chain
npm ERR! gyp ERR! stack     at ClientRequest.<anonymous> (C:\Users\oguzhan.duran\Desktop\case-app\node_modules\minipass-fetch\lib\index.js:110:14)
npm ERR! gyp ERR! stack     at ClientRequest.emit (node:events:526:28)
npm ERR! gyp ERR! stack     at TLSSocket.socketErrorListener (node:_http_client:442:9)
npm ERR! gyp ERR! stack     at TLSSocket.emit (node:events:538:35)
npm ERR! gyp ERR! stack     at emitErrorNT (node:internal/streams/destroy:157:8)
npm ERR! gyp ERR! stack     at emitErrorCloseNT (node:internal/streams/destroy:122:3)
npm ERR! gyp ERR! stack     at processTicksAndRejections (node:internal/process/task_queues:83:21)```


Solution 1:[1]

In our case the issue was because of using node-sass behind an enterprise proxy. We could not manage to get node trusting the proxy's certificates so we decided to switch from

node-sass (https://www.npmjs.com/package/sass)

to

sass (Dart Sass, https://sass-lang.com/dart-sass)

which solved the issue for us. Node-Sass does require some downloads which dart sass does not. Dart Sass nearly seems to be a 1 to 1 replacement to node-sass, and as far as we have seen bigger frameworks (like Angular, React, etc.) already switched to it.

Maybe this might help...

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Timon