platform

11 views
Skip to first unread message

htu...@gmail.com

unread,
Mar 27, 2017, 2:39:53 PM3/27/17
to nodejs
hello


Is node.js is platform dependent or independent ?


Jeremy Darling

unread,
Mar 27, 2017, 2:57:57 PM3/27/17
to nodejs
2nd response from google for exactly that question answers this best:


(from http://stackoverflow.com/questions/35238667/is-npm-dependent-on-the-os-of-a-computer with slight inline edits)

The binary, npm, that you install is platform dependent, as is node.js. That's why there are different releases for each platform available on the download site.

For the most part, your project files are platform independent. For example, most of your JavaScript files will all be used by node.js and work just fine without having to worry about what platform you are on because the system details will be dealt with by node.js itself.

However, some modules are platform dependent. For example, anything that uses node-gyp will try to compile on your platform whenever the module is installed by npm. You do not have to worry about that though because it is handled by npm, that's why you're using a package manager.

Copying node_modules can be done; but it's more often than not better and easier to just run npm i on whatever machine is going to be running your application. You can avoid having to worry about version problems using something like npm shrinkwrap which will lock down the version of a package that your module depends on.

answered Feb 6 '16 at 8:24
zero298
3,81731938

On Mon, Mar 27, 2017 at 1:07 PM, <htu...@gmail.com> wrote:
hello


Is node.js is platform dependent or independent ?


--
Job board: http://jobs.nodejs.org/
New group rules: https://gist.github.com/othiym23/9886289#file-moderation-policy-md
Old group rules: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
---
You received this message because you are subscribed to the Google Groups "nodejs" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nodejs+unsubscribe@googlegroups.com.
To post to this group, send email to nod...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/nodejs/8f8b4285-5374-4490-9b05-7b4217cdb37a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages