y-leveldb
y-leveldb copied to clipboard
Installing fails with node-gyp-build error for leveldown for Node 18 + PNPM
Checklist
- [x] Are you reporting a bug? Use github issues for bug reports and feature requests. For general questions, please use https://discuss.yjs.dev/
- [ ] Try to report your issue in the correct repository. Yjs consists of many modules. When in doubt, report it to https://github.com/yjs/yjs/issues/
Describe the bug Presumably other setups too.
The level package is now on v8 and this package is using v6. Presumably upgrading level would fix things.
To Reproduce Steps to reproduce the behavior:
- Install this package with Node 18 & PNPM
Expected behavior It installs.
I just upgraded the package-lock version and the packages. Can you please check if this helped? Upgrading to v8 will be more work as there were a lot of breaking changes.
Encountering the same issue with release 0.1.2 on Node v16.19.0 & pnpm 7.18.2
../../node_modules/leveldown install$ node-gyp-build
│ sh: /leveldown/node_modules/.bin/node-gyp-build: Permission denied
apple silicon failed install
➜ yzc-client npm -v
8.13.1
➜ yzc-client node -v
v16.15.1
➜ yzc-client
../deps/leveldb/leveldb-1.20/port/atomic_pointer.h:59:3: warning: 'OSMemoryBarrier' is deprecated: first deprecated in macOS 10.12 - Use std::atomic_thread_fence() from <atomic> instead [-Wdeprecated-declarations]
OSMemoryBarrier();
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/libkern/OSAtomicDeprecated.h:750:9: note: 'OSMemoryBarrier' has been explicitly marked deprecated here
void OSMemoryBarrier( void );
^
1 warning generated.
LIBTOOL-STATIC Release/leveldb.a
env: python: No such file or directory
make: *** [Release/leveldb.a] Error 127
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/Users/monsterstep/.meteor/packages/meteor-tool/.2.11.0.1ud6gf3.al62++os.osx.arm64+web.browser+web.browser.legacy+web.cordova/mt-os.osx.arm64/dev_bundle/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:194:23)
gyp ERR! stack at ChildProcess.emit (events.js:400:28)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:285:12)
gyp ERR! System Darwin 22.3.0
gyp ERR! command "/Users/monsterstep/.meteor/packages/meteor-tool/.2.11.0.1ud6gf3.al62++os.osx.arm64+web.browser+web.browser.legacy+web.cordova/mt-os.osx.arm64/dev_bundle/bin/node" "/Users/monsterstep/.meteor/packages/meteor-tool/.2.11.0.1ud6gf3.al62++os.osx.arm64+web.browser+web.browser.legacy+web.cordova/mt-os.osx.arm64/dev_bundle/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/monsterstep/dev/meteor-playground/yzc-client/node_modules/leveldown
gyp ERR! node -v v14.21.3
gyp ERR! node-gyp -v v5.1.0
gyp ERR! not ok
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] install: `node-gyp-build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/monsterstep/.npm/_logs/2023-03-15T09_07_32_302Z-debug.log
➜ yzc-client nvm
I'm getting this issue too. node v21.0.0, npm 10.2.1, node-gyp 9.4.0
The issue is fixed in level v8 but y-level is still using v6. Until that's fixed you can try overriding in you package.json.
rpm i works:
{
"name": "works",
"dependencies": {
"level": "^8.0.0",
"y-leveldb": "^0.1.2",
"y-websocket": "^1.5.0",
"yjs": "^13.6.8"
},
"overrides": {
"y-leveldb": {
"level": "$level"
}
}
}
rpm i fails:
{
"name": "fails",
"dependencies": {
"y-leveldb": "^0.1.2",
"y-websocket": "^1.5.0",
"yjs": "^13.6.8"
}
}