mirror of
https://github.com/lovell/sharp.git
synced 2025-07-09 10:30:15 +02:00
Docs: recommend use of npm cpu/os flags for cross-install
This commit is contained in:
parent
4a37a27cca
commit
1915c1387e
@ -117,6 +117,16 @@ depending on the chosen architecture.
|
|||||||
When building your deployment package on a machine that differs from the target architecture,
|
When building your deployment package on a machine that differs from the target architecture,
|
||||||
you will need to install either `@img/sharp-linux-x64` or `@img/sharp-linux-arm64` package.
|
you will need to install either `@img/sharp-linux-x64` or `@img/sharp-linux-arm64` package.
|
||||||
|
|
||||||
|
```sh
|
||||||
|
npm install --os=linux --cpu=x64
|
||||||
|
```
|
||||||
|
|
||||||
|
```sh
|
||||||
|
npm install --os=linux --cpu=arm64
|
||||||
|
```
|
||||||
|
|
||||||
|
When using npm 9 or earlier, this can be achieved using the following:
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
npm install --force @img/sharp-linux-x64
|
npm install --force @img/sharp-linux-x64
|
||||||
```
|
```
|
||||||
@ -174,7 +184,7 @@ custom:
|
|||||||
- sharp
|
- sharp
|
||||||
packagerOptions:
|
packagerOptions:
|
||||||
scripts:
|
scripts:
|
||||||
- npm install --force @img/sharp-linux-x64
|
- npm install --os=linux --cpu=x64 sharp
|
||||||
```
|
```
|
||||||
|
|
||||||
## TypeScript
|
## TypeScript
|
||||||
|
Loading…
x
Reference in New Issue
Block a user