Skip to content

Cannot find module '../build/Release/sharp-win32-x64.node' #413

@sosohu

Description

@sosohu

Hi, all, I build the surfsense_browser_extension on Windows and get the following error:

Z:\popular\SurfSense\surfsense_browser_extension>pnpm build

> surfsense_browser_extension@0.0.7 build Z:\popular\SurfSense\surfsense_browser_extension
> plasmo build

Z:\popular\SurfSense\surfsense_browser_extension\node_modules\.pnpm\sharp@0.32.6\node_modules\sharp\lib\sharp.js:37
  throw new Error(help.join('\n'));
        ^

Error:
Something went wrong installing the "sharp" module

Cannot find module '../build/Release/sharp-win32-x64.node'
Require stack:
- Z:\popular\SurfSense\surfsense_browser_extension\node_modules\.pnpm\sharp@0.32.6\node_modules\sharp\lib\sharp.js
- Z:\popular\SurfSense\surfsense_browser_extension\node_modules\.pnpm\sharp@0.32.6\node_modules\sharp\lib\constructor.js
- Z:\popular\SurfSense\surfsense_browser_extension\node_modules\.pnpm\sharp@0.32.6\node_modules\sharp\lib\index.js

Possible solutions:
- Install with verbose logging and look for errors: "npm install --ignore-scripts=false --foreground-scripts --verbose sharp"
- Install for the current win32-x64 runtime: "npm install --platform=win32 --arch=x64 sharp"
- Consult the installation documentation: https://sharp.pixelplumbing.com/install
    at Object.<anonymous> (Z:\popular\SurfSense\surfsense_browser_extension\node_modules\.pnpm\sharp@0.32.6\node_modules\sharp\lib\sharp.js:37:9)
    at Module._compile (node:internal/modules/cjs/loader:1455:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1534:10)
    at Module.load (node:internal/modules/cjs/loader:1265:32)
    at Module._load (node:internal/modules/cjs/loader:1081:12)
    at Module.require (node:internal/modules/cjs/loader:1290:19)
    at require (node:internal/modules/helpers:188:18)
    at Object.<anonymous> (Z:\popular\SurfSense\surfsense_browser_extension\node_modules\.pnpm\sharp@0.32.6\node_modules\sharp\lib\constructor.js:11:1)
    at Module._compile (node:internal/modules/cjs/loader:1455:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1534:10)

Node.js v22.0.0
 ELIFECYCLE  Command failed with exit code 1.

Does some guy have some workaround?

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingquestionFurther information is requested

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions