Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个在node.js上开发的项目。开发在两台不同的机器上进行:一台是 x32,另一台是 x64。问题是一些 npm 模块如果在不同的环境中运行会产生冲突。
例如,dNode。我将它安装在一台 32 位的机器上,但是在带有 shch 位的计算机上,这个模块会抛出一个错误。我能以某种方式控制这个过程吗?
将依赖项添加到目标机器上package.json然后使用npm install。如果模块具有特殊的拱形功能,它将在npm install. 不要将模块与您的代码库一起发布。
package.json
npm install