help
help copied to clipboard
What are 'tools for native modules'? Help a newbie decide if they are necessary (NodeJS installation)
Details
I have just started my online NodeJS course, the lecture was recorded at the time of NodeJS version 10 (on a mac). I'm on Windows, it is now version 16. The lecture does not contain this page of the installation screen:
https://i.stack.imgur.com/VReOQ.png
Summary: I do not know if I want native modules, or what they are - but I do not want chocolatey.
I have done much research online, yet still I cannot find anything to clear up the following question for me anywhere, that is the real issue here, this information should be more available for people like me.
1.My question: How important are these native modules? Do I need them? Or do you recommend them, and why?
2.Chocolatey: Out of interest, perhaps you could tell me why NodeJS have bundled together native modules and Chocolatey?
I have decided I do not want chocolatey (no problem, if I decide to install the 'tools' then I will go onto GitHub and install them manually, as it says in the screenshot.)
The reason I do not want chocolatey is because: from my research I do not think I need chocolatey and I have seen that uninstalling chocolatey will potentially cause me one or two problems, so I'll avoid it all together - but I thought I'd mention that here on the side, because maybe somebody knows a very valid reason why they are bundled together, and it will change my mind.
Node.js version
16.14.0
Example code
No response
Operating system
Windows
Scope
Installation
Module and version
Not applicable.
Native modules refers to the modules that are written outside of JavaScript, modules that are written in C++ (C++ addons) for example and embedded into JavaScript using things like N-API (Node-API).
Some modules, NPM packages and libraries are written as native modules, so you would need these tools to install and work with them, if you're not planning to use or work with native modules, then you don't need to install those tools for native modules.
@ShnObrn - is this resolved?
Native modules refers to the modules that are written outside of JavaScript, modules that are written in C++ (C++ addons) for example and embedded into JavaScript using things like N-API (Node-API).
Some modules, NPM packages and libraries are written as native modules, so you would need these tools to install and work with them, if you're not planning to use or work with native modules, then you don't need to install those tools for native modules.
Great answer but how would I know if I need to use it? Basically for what tasks I need it? What I can do additionally using these native tools.. Let me know you I'm a newbie and don't know much about node.js usages and application.. I'm exploring about it. and want to learn about it deeply.
but how would I know if I need to use it? Basically for what tasks I need it?
As mentioned, you would need to use them if you're planning to install modules that are not written with JavaScript, when installing these types of modules it'll tell you what tools you're missing that are required to install the said modules.
For example, to install the canvas package you would need those tools to install it, although the tools you'll need to install can vary from operating system to operating system, for example; in Windows you would have to install Visual Studio, in Debian/Ubuntu-based Linux distributions, you would need to install the build-essential
package (and also various other packages, mentioned in canvas' wiki), and so on.
What I can do additionally using these native tools
You can additionally make native modules with said tools, such as C++ addons as mentioned; there are a few guides on how to do so.
It seems @krutarth-vaishnav question could be answered by identifying the modules that make up the native modules collection and then describing their purposes individually. This would allow for the documentation to grow and shrink as modules are added and removed.
but how would I know if I need to use it? Basically for what tasks I need it?
As mentioned, you would need to use them if you're planning to install modules that are not written with JavaScript, when installing these types of modules it'll tell you what tools you're missing that are required to install the said modules.
For example, to install the canvas package you would need those tools to install it, although the tools you'll need to install can vary from operating system to operating system, for example; in Windows you would have to install Visual Studio, in Debian/Ubuntu-based Linux distributions, you would need to install the
build-essential
package (and also various other packages, mentioned in canvas' wiki), and so on.What I can do additionally using these native tools
You can additionally make native modules with said tools, such as C++ addons as mentioned; there are a few guides on how to do so.
Could the native modules be installed later on when the need for them arises (or must I install them in advance when installing NodeJS)? Thanks!
It seems @krutarth-vaishnav question could be answered by identifying the modules that make up the native modules collection and then describing their purposes individually. This would allow for the documentation to grow and shrink as modules are added and removed.
There are too many packages to sort them all out saying this is native and this isn't and this is what they all do. And if you're starting a career as a developer there's no way if predicting all the packages you'll end up using. To me it makes sense not to install things until you know they're needed.
but how would I know if I need to use it? Basically for what tasks I need it?
As mentioned, you would need to use them if you're planning to install modules that are not written with JavaScript, when installing these types of modules it'll tell you what tools you're missing that are required to install the said modules. For example, to install the canvas package you would need those tools to install it, although the tools you'll need to install can vary from operating system to operating system, for example; in Windows you would have to install Visual Studio, in Debian/Ubuntu-based Linux distributions, you would need to install the
build-essential
package (and also various other packages, mentioned in canvas' wiki), and so on.What I can do additionally using these native tools
You can additionally make native modules with said tools, such as C++ addons as mentioned; there are a few guides on how to do so.
Could the native modules be installed later on when the need for them arises (or must I install them in advance when installing NodeJS)? Thanks!
You should be able to install things on an as need basis. Worst case scenario you uninstall and reinstall Node.js with desired configuration when the need arises.
What is I already had chocolatey?
The new install should just overwrite the previous install.
It seems there has been no activity on this issue for a while, and it is being closed in 30 days. If you believe this issue should remain open, please leave a comment. If you need further assistance or have questions, you can also search for similar issues on Stack Overflow. Make sure to look at the README file for the most updated links.
It seems there has been no activity on this issue for a while, and it is being closed. If you believe this issue should remain open, please leave a comment. If you need further assistance or have questions, you can also search for similar issues on Stack Overflow. Make sure to look at the README file for the most updated links.