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 <https://docs.npmjs.com/cli/shrinkwrap> which
will lock down the version of a package that your module depends on.
share <http://stackoverflow.com/a/35238945>improve this answer
<http://stackoverflow.com/posts/35238945/edit>
answered Feb 6 '16 at 8:24
<http://stackoverflow.com/users/691711/zero298>
zero298 <http://stackoverflow.com/users/691711/zero298>
3,81731938

On Mon, Mar 27, 2017 at 1:07 PM, <[email protected]> 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 [email protected].
> To post to this group, send email to [email protected].
> To view this discussion on the web visit https://groups.google.com/d/
> msgid/nodejs/8f8b4285-5374-4490-9b05-7b4217cdb37a%40googlegroups.com
> <https://groups.google.com/d/msgid/nodejs/8f8b4285-5374-4490-9b05-7b4217cdb37a%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/nodejs/CAAhs7Ei9tRkcLVBBjL5TPFYf7byYU40TfcKGfkpeTGDEETfQyA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to