sst / ion

❍ — a new engine for SST
https://ion.sst.dev
MIT License
1.09k stars 126 forks source link

fix(node): support npm versions 10 and above #549

Closed gronxb closed 5 days ago

gronxb commented 2 weeks ago

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.

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

jayair commented 6 days ago

Interesting. Yeah we'll take a look.