最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - How can I install node_modules for an architecture other than my dev machine? - Stack Overflow

programmeradmin1浏览0评论

I'm working on a yocto project and I'm doing the development on an x86 linux machine. However, the build target is arm64 linux, and I need the native modules (specifically sharp) to be compiled for arm64. However, when I run npm install --target_arch=arm64, the native modules are only ever for x86. I'm considering using Bun's cross-compilation feature, but I'd really prefer to stick with Node, since it's presumably much more stable.

I tried using export npm_config_arch=arm64 as well as including the --target_arch=arm64 flag for npm. Neither of which installed the arm64 version of sharp.

发布评论

评论列表(0)

  1. 暂无评论