Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Installing fails with node-gyp-build error for leveldown for Node 18 + PNPM #14

Open
1 of 2 tasks
KyleAMathews opened this issue Jan 9, 2023 · 5 comments
Open
1 of 2 tasks
Assignees
Labels

Comments

@KyleAMathews
Copy link

Checklist

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:

  1. Install this package with Node 18 & PNPM

Expected behavior
It installs.

@dmonad
Copy link
Member

dmonad commented Jan 16, 2023

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.

@Alex-ray
Copy link

Alex-ray commented Jan 28, 2023

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

@crapthings
Copy link

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

@aogriffiths
Copy link

I'm getting this issue too. node v21.0.0, npm 10.2.1, node-gyp 9.4.0

@aogriffiths
Copy link

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"
  }
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants