0

I am bit new to Node js. Sometime back when I was installing a node package It threw a runtime error said python not found or something like that. After successful installation of python it worked. My question is why we need python to install a node package? Can anyone explain

Swastik
  • 499
  • 1
  • 4
  • 10
  • Does this answer your question? [Node.js: Python not found exception due to node-sass and node-gyp](https://stackoverflow.com/questions/45801457/node-js-python-not-found-exception-due-to-node-sass-and-node-gyp) – Red Nov 11 '20 at 15:48
  • my question is why we need to install python. I am bit new to node. Like in java we use jar and to compile jdk is fine. but for a npm package why we need python? that is a different language ryt – Swastik Nov 11 '20 at 15:58
  • Node tries to download the binary for your platform when installing. – Red Nov 11 '20 at 15:59

1 Answers1

1

One of the dependencies of Node.js is GYP (https://gyp.gsrc.io/docs/UserDocumentation.md) which is written in Python.

You can read more abbout that on the official Node.js's dependencies documentation: https://nodejs.org/en/docs/meta/topics/dependencies/

Origine
  • 49
  • 1
  • 9