问题描述
我想我有一个简短的问题.
i think i have a short question.
我在www中找不到任何内容.如果我在Windows机器上运行 npm install
来安装我的依赖项.是否可以将 node_module
目录移动到Linux计算机上并运行我的nodejs脚本,还是在安装操作系统并选择其他安装路径之前先进行npm检查?
I can't find anything in the www. if i run npm install
on a windows machine to install my dependencies. is it possible to move the node_module
directory to a linux machine and run my nodejs script, or is npm checking before installing my os and choose other install path's?
打招呼
推荐答案
是的,可能会有差异,例如,如果您(或您的依赖项)使用内置的node.js插件,例如通过node-gyp并包含本机二进制代码.在 package.json
中还可以包含特定于OS/CPU的内容.
Yes, there can be differences, say, if you (or your dependencies) use native node.js addons, which are built e.g. by node-gyp and contain native binary code. Also there can be OS/CPU - specific stuff in package.json
.
package.json描述可以在这里找到: https://docs.npmjs.com/files/package.json
package.json description can be found here:https://docs.npmjs.com/files/package.json
这篇关于在Windows和Windows上的npm install之间有区别吗?linux的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!