toeverything / blocksuite

🧩 Content editing tech stack for the web - BlockSuite is a toolkit for building editors and collaborative applications.
https://blocksuite.io
Mozilla Public License 2.0
4.45k stars 408 forks source link

`pnpm add @blocksuite/store` failed #294

Closed doodlewind closed 1 year ago

doodlewind commented 1 year ago

In a fresh Vite project, installing BlockSuite with pnpm add failed. Log:

test-app git:(main) pnpm add @blocksuite/store @blocksuite/blocks @blocksuite/editor
Packages: +90
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
node_modules/.pnpm/leveldown@5.6.0/node_modules/leveldown: Running instanode_modules/.pnpm/leveldown@5.6.0/node_modules/leveldown: Running install script, failed in 764msused 98, downloaded 8, added 90, done
.../node_modules/leveldown install$ node-gyp-build
│ node:events:491
│       throw er; // Unhandled 'error' event
│       ^
│ Error: spawn node-gyp ENOENT
│     at Process.ChildProcess._handle.onexit (node:internal/child_proc
│     at onErrorNT (node:internal/child_process:478:16)
│     at processTicksAndRejections (node:internal/process/task_queues:
│ Emitted 'error' event on ChildProcess instance at:
│     at Process.ChildProcess._handle.onexit (node:internal/child_proc
│     at onErrorNT (node:internal/child_process:478:16)
│     at processTicksAndRejections (node:internal/process/task_queues:
│   errno: -2,
│   code: 'ENOENT',
│   syscall: 'spawn node-gyp',
│   path: 'node-gyp',
│   spawnargs: [ 'rebuild' ]
│ }
└─ Failed in 764ms

Workaround: pnpm i --no-optional

This should be a dependency issue originating from #220.

doodlewind commented 1 year ago

Fixed in #387