Skip to content

Unable to run local dev preview on Linux #2142

Closed
@hnrkndrssn

Description

@hnrkndrssn

Following the instructions here fails when running pnpm dev with the following error:

> pnpm dev

> @octopus/docs@0.0.1 dev /home/henrik/code/octopusdeploy/docs
> node --no-experimental-fetch ./src/themes/accelerator/utilities/img.mjs && astro dev

/home/henrik/code/octopusdeploy/docs/node_modules/.pnpm/sharp@0.33.1/node_modules/sharp/lib/sharp.js:107
  throw new Error(help.join('\n'));
        ^

Error: Could not load the "sharp" module using the linux-x64 runtime
Possible solutions:
- Ensure optional dependencies can be installed:
    npm install --include=optional sharp
    yarn add sharp --ignore-engines
- Ensure your package manager supports multi-platform installation:
    See https://sharp.pixelplumbing.com/install#cross-platform
- Add platform-specific dependencies:
    npm install --os=linux --cpu=x64 sharp
    npm install --force @img/sharp-linux-x64
- Consult the installation documentation:
    See https://sharp.pixelplumbing.com/install
    at Object.<anonymous> (/home/henrik/code/octopusdeploy/docs/node_modules/.pnpm/sharp@0.33.1/node_modules/sharp/lib/sharp.js:107:9)
    at Module._compile (node:internal/modules/cjs/loader:1254:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1308:10)
    at Module.load (node:internal/modules/cjs/loader:1117:32)
    at Module._load (node:internal/modules/cjs/loader:958:12)
    at Module.require (node:internal/modules/cjs/loader:1141:19)
    at require (node:internal/modules/cjs/helpers:110:18)
    at Object.<anonymous> (/home/henrik/code/octopusdeploy/docs/node_modules/.pnpm/sharp@0.33.1/node_modules/sharp/lib/constructor.js:10:1)
    at Module._compile (node:internal/modules/cjs/loader:1254:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1308:10)

Node.js v18.15.0
 ELIFECYCLE  Command failed with exit code 1.

node/npm/pnpm info:

> node -v
v18.15.0
> npm -v
9.5.0
> pnpm -v
8.11.0

Linux distribution info:

> lsb_release -a
No LSB modules are available.
Distributor ID:	Ubuntu
Description:	Ubuntu 22.04.3 LTS
Release:	22.04
Codename:	jammy

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions