nuxt / nuxt/image

Can not install Nuxt Image module on a Nuxt site with Deno package manager

Open
#1,691 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

upstream
Dominant language
TypeScript
Stars
1.5k
Forks
331
Avg merge
19h 52m
Merged PRs (30d)
9

Description

Deno is supported now by Nuxt and shown as an option as your package manager for new Nuxt Projects initiated via CLI.

However, this module doesn't work with Deno. I noted this on a closed issue: https://github.com/nuxt/image/issues/1210#issuecomment-2494659513

Deno’s Node.js compatibility layer doesn’t fully implement BrotliDecompress.prototype.constructor, which sharp relies on internally. This gives you an error message on deno install

Warning The following packages contained npm lifecycle scripts (preinstall/install/postinstall) that were not executed:
...
┠─ npm:sharp@0.32.6
...

And if you try to use the allow-scripts flag you get:

error: script 'install' in 'sharp@0.32.6' failed with exit code 1
stdout:
sharp: Using cached C:\Users\ryan\AppData\Roaming\npm-cache\_libvips\libvips-8.14.5-win32-x64.tar.br
sharp: Please see https://sharp.pixelplumbing.com/install for required dependencies

stderr:
sharp: Installation error: Not implemented: BrotliDecompress.prototype.constructor

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No source file or test is named. Start by reproducing deno install and the allow-scripts failure with the Nuxt Image module, then inspect the sharp installation path involved. Done means the module installs successfully under Deno without the BrotliDecompress error.

Written by the indexing model from the issue text.

Assessment

Tech stack
deno, nuxt, typescript
Domain
build-system, tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.