Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Platform Specific Build is Not Downloaded #91

Closed
clehnert-wfw opened this issue Jan 15, 2021 · 5 comments
Closed

Platform Specific Build is Not Downloaded #91

clehnert-wfw opened this issue Jan 15, 2021 · 5 comments

Comments

@clehnert-wfw
Copy link

I am on a Windows machine trying to download the Linux distribution of metascraper using the following npm install command:

npm install --arch=x64 --platform=linux metascraper

This seems to work just fine.

Somewhere down the dependency line, re2 is installed however, instead of installing the linux version (which I do see on your release page) I get the Windows version. This breaks my code (AWS Lambda). I have tried doing an re2 install afterwards (npm install --arch=x64 --platform=linux re2) but I still only get the Windows build.

How can I download and install the Linux version?

Thanks

@uhop
Copy link
Owner

uhop commented Jan 15, 2021

AFAIK, node binary extensions do not support cross compilation.

If you want to skip downloading a precompiled version, just define an environment variable DEVELOPMENT_SKIP_GETTING_ASSET with any non-empty value. please let me know if it helped.

@uhop
Copy link
Owner

uhop commented Jan 15, 2021

BTW, what is the source of --arch=x64 --platform=linux? As far as I can tell it is not documented:

Likely it is specific to metascraper.

I do use AWS and build my code in a docker image running on a similar hardware. Sometimes the hardware should be identical to run-time because some processor-intensive packages (e.g., various compression utilities in my case) use a CPU-specific code generation. I believe that AWS Lambda is well documented and the best bet is to replicate its environment to do a build if possible.

@clehnert-wfw
Copy link
Author

Ok. I think the problem is I assumed the --arch=x64 --platform=linux parameters were universal but they are not (I actually used them installing sharp). My bad. I guess will have to setup docker and run my builds from there.

Thanks for your help.

@uhop uhop closed this as completed Jan 19, 2021
@uhop
Copy link
Owner

uhop commented Jan 19, 2021

I'll copy the content of this ticket to the wiki.

@uhop
Copy link
Owner

uhop commented Feb 5, 2021

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants