Skip to content

npm install fails as node-gyp is unable to build lmdbΒ #8152

@rincewindcz

Description

@rincewindcz

πŸ› bug report

When trying to install parcel into npm project, npm install --save-dev parcel fails with exit code 7, complaining about node-gyp failing to build lmdb package.

πŸŽ› Log

$ npm install --save-dev parcel
npm ERR! code 7
npm ERR! path /tmp/parcel-bug/node_modules/lmdb
npm ERR! command failed
npm ERR! command sh -c node-gyp-build-optional-packages
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using [email protected]
npm ERR! gyp info using [email protected] | linux | x64
npm ERR! gyp info find Python using Python version 3.10.4 found at "/usr/bin/python3"
npm ERR! gyp ERR! UNCAUGHT EXCEPTION 
npm ERR! gyp ERR! stack Error: Cannot find module 'request'
npm ERR! gyp ERR! stack Require stack:
npm ERR! gyp ERR! stack - /usr/lib/node_modules/npm/node_modules/node-gyp/lib/install.js
npm ERR! gyp ERR! stack - /usr/lib/node_modules/npm/node_modules/node-gyp/lib/node-gyp.js
npm ERR! gyp ERR! stack - /usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js
npm ERR! gyp ERR! stack     at Module._resolveFilename (node:internal/modules/cjs/loader:939:15)
npm ERR! gyp ERR! stack     at Module._load (node:internal/modules/cjs/loader:780:27)
npm ERR! gyp ERR! stack     at Module.require (node:internal/modules/cjs/loader:1005:19)
npm ERR! gyp ERR! stack     at require (node:internal/modules/cjs/helpers:102:18)
npm ERR! gyp ERR! stack     at Object.<anonymous> (/usr/lib/node_modules/npm/node_modules/node-gyp/lib/install.js:10:17)
npm ERR! gyp ERR! stack     at Module._compile (node:internal/modules/cjs/loader:1105:14)
npm ERR! gyp ERR! stack     at Module._extensions..js (node:internal/modules/cjs/loader:1159:10)
npm ERR! gyp ERR! stack     at Module.load (node:internal/modules/cjs/loader:981:32)
npm ERR! gyp ERR! stack     at Module._load (node:internal/modules/cjs/loader:827:12)
npm ERR! gyp ERR! stack     at Module.require (node:internal/modules/cjs/loader:1005:19)
npm ERR! gyp ERR! System Linux 5.17.9-arch1-1
npm ERR! gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
npm ERR! gyp ERR! cwd /tmp/parcel-bug/node_modules/lmdb
npm ERR! gyp ERR! node -v v18.2.0
npm ERR! gyp ERR! node-gyp -v v7.1.2
npm ERR! gyp ERR! Node-gyp failed to build your package.
npm ERR! gyp ERR! Try to update npm and/or node-gyp and if it does not help file an issue with the package author.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/myawesomeusername/.npm/_logs/2022-05-27T10_20_36_304Z-debug-0.log

🌍 Your Environment

Software Version(s)
Node v18.2.0
npm 8.5.5
Operating System Arch Linux / x64

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions