XXX binaries cannot be used on the 'linux-x64' platform.
See original GitHub issueHi, I was using sharp for an AWS Lambda function (v0.18.0) and it was working very well. I want to update to the last version (v0.21), however, I’m now having an issue:
- ‘darwin-x64’ binaries cannot be used on the ‘linux-x64’ platform. (npm install done on mac)
- ‘win-x64’ binaries cannot be used on the ‘linux-x64’ platform. (npm install done on win10) These errors
It looks like there is a problem with libvips:
"stackTrace": [
"Object.<anonymous> (/var/task/node_modules/sharp/lib/constructor.js:9:22)",
"Module._compile (module.js:570:32)",
"Object.Module._extensions..js (module.js:579:10)",
"Module.load (module.js:487:32)",
"tryModuleLoad (module.js:446:12)",
"Function.Module._load (module.js:438:3)",
"Module.require (module.js:497:17)",
"require (internal/module.js:20:19)",
"Object.<anonymous> (/var/task/node_modules/sharp/lib/index.js:3:15)"
]
CloudWatch logs:
module initialization error: Error
at Object.hasVendoredLibvips (/var/task/node_modules/sharp/lib/libvips.js:61:13)
at Object.<anonymous> (/var/task/node_modules/sharp/lib/constructor.js:9:22)
at Module._compile (module.js:570:32)
at Object.Module._extensions..js (module.js:579:10)
at Module.load (module.js:487:32)
at tryModuleLoad (module.js:446:12)
at Function.Module._load (module.js:438:3)
at Module.require (module.js:497:17)
at require (internal/module.js:20:19)
at Object.<anonymous> (/var/task/node_modules/sharp/lib/index.js:3:15)
I don’t really understand your documentation Do I need to install Docker, create a linux container and then do npm install?
Issue Analytics
- State:
- Created 5 years ago
- Reactions:1
- Comments:5 (2 by maintainers)
Top Results From Across the Web
node modules - Error:'darwin-x64' binaries cannot be used on ...
The answer here resolved it for me: Run brew reinstall vips . Then delete the node_modules folder and install all dependencies again (with...
Read more >Building a project with luntimeIdentifiers = "linux-x64" result in ...
I would expect that building a Linux project grom GUI would result in a non-exe file that is Linux compatible but that's not...
Read more >OpenJDK Build README
When the normal defaults fail or components cannot be found, the various ALT_* variables (alternates) can be used to help the makefiles locate...
Read more >When Things Go Wrong — PyArmor 7.6.0 documentation
This is not PyArmor's error, just Python can not find it. ... Because the obfuscated scripts include binary library, it's platform dependent, and...
Read more >How to Update node.JS to the Latest Version - HotFrameworks
Node.js is a free, cross-platform, open-source JavaScript runtime environment ... x.x-linux-x64.tar.xz — (where x.x.x is the version of the binary file).
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Commit dcd6830 adds a Docker-less method to the docs.
http://sharp.pixelplumbing.com/en/latest/install/#aws-lambda
Hello, AWS Lambda uses 64-bit Linux and you’ll need to ensure
npm install
is run on the same platform to populatenode_modules
with the correct files.The Docker command shown at http://sharp.pixelplumbing.com/en/stable/install/#aws-lambda allows you to run
npm install
inside a Linux container that closely matches the AWS Lambda runtime.