Deployments succeed, but the application is not accessible. This issue occurs because the node_modules directory uploaded to AWS Lambda is built for Darwin architecture. Starting from npm version 9, the arch and platform options have been changed to cpu and os.
Environment
M1 Mac npm version 10
Problem
I'm using the
@node-rs/*
module.Deployments succeed, but the application is not accessible. This issue occurs because the node_modules directory uploaded to AWS Lambda is built for Darwin architecture. Starting from npm version 9, the arch and platform options have been changed to cpu and os.
--platform
to--os
--arch
to--cpu
https://docs.npmjs.com/cli/v9/commands/npm-install#cpu
Solution
To handle backward compatibility and the latest versions in npm, you can use duplicate options. It doesn't matter if there are duplicates.
Fixed #578