nodejs / node-gyp

Node.js native addon build tool
MIT License
9.97k stars 1.8k forks source link

leveldown package issue #3093

Open Jy496 opened 1 week ago

Jy496 commented 1 week ago

npm ERR! gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ] npm ERR! In file included from ../deps/leveldb/leveldb-1.20/db/builder.cc:5: npm ERR! In file included from ../deps/leveldb/leveldb-1.20/db/builder.h:8: npm ERR! ../deps/leveldb/leveldb-1.20/include/leveldb/status.h:16:10: fatal error: 'string' file not found npm ERR! 16 | #include npm ERR! | ^~~~ npm ERR! 1 error generated. npm ERR! make: * [Release/obj.target/leveldb/deps/leveldb/leveldb-1.20/db/builder.o] Error 1 npm ERR! gyp ERR! build error npm ERR! gyp ERR! stack Error: make failed with exit code: 2 npm ERR! gyp ERR! stack at ChildProcess.onExit (/Users/username/repo/node_modules/node-gyp/lib/build.js:203:23) npm ERR! gyp ERR! stack at ChildProcess.emit (node:events:514:28) npm ERR! gyp ERR! stack at ChildProcess._handle.onexit (node:internal/child_process:294:12) npm ERR! gyp ERR! System Darwin 23.6.0 npm ERR! gyp ERR! command "/Users/username/.nvm/versions/node/v20.9.0/bin/node" "/Users/username/repo/node_modules/.bin/node-gyp" "rebuild" npm ERR! gyp ERR! cwd /s/node_modules/leveldown npm ERR! gyp ERR! node -v v20.9.0 npm ERR! gyp ERR! node-gyp -v v9.4.1 npm ERR! gyp ERR! not ok

Getting above error while installing node_modules using npm i after upgrading Mac.

I tried almost all the possible ways since 3 days but No luck. Can any one help me on this

cclauss commented 1 week ago

Please tell us what command you typed and provide the full error log.

npm ERR! gyp ERR! node-gyp -v v9.4.1

vs. https://github.com/nodejs/node-gyp/releases

vweevers commented 1 week ago

@Jy496 You should replace leveldown with classic-level. See UPGRADING.md. Or if you're not using leveldown directly, but instead using level, then update that package to the latest version.

Jy496 commented 1 week ago

Please find complete error below

lerna ERR! npm install --legacy-peer-deps exited 1 in 'sub-repo' lerna ERR! npm install --legacy-peer-deps stderr: npm WARN deprecated @types/protractor@4.0.0: This is a stub types definition for Protractor (https://github.com/angular/protractor). Protractor provides its own type definitions, so you don't need @types/protractor installed! npm WARN deprecated @types/vfile-message@2.0.0: This is a stub types definition. vfile-message provides its own type definitions, so you do not need this installed. npm WARN deprecated osenv@0.1.5: This package is no longer supported. npm WARN deprecated inflight@1.0.6: This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful. npm WARN deprecated time-grunt@2.0.0: Deprecated because Grunt is practically unmaintained. Move on to something better. This package will continue to work with Grunt v1, but it will not receive any updates. npm WARN deprecated source-map-url@0.4.1: See https://github.com/lydell/source-map-url#deprecated npm WARN deprecated stable@0.1.8: Modern JS already guarantees Array#sort() is a stable sort, so this library is deprecated. See the compatibility table on MDN: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort#browser_compatibility npm WARN deprecated @babel/plugin-proposal-class-properties@7.18.6: This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-class-properties instead. npm WARN deprecated rimraf@2.7.1: Rimraf versions prior to v4 are no longer supported npm WARN deprecated rimraf@2.7.1: Rimraf versions prior to v4 are no longer supported npm WARN deprecated rimraf@2.7.1: Rimraf versions prior to v4 are no longer supported npm WARN deprecated rimraf@2.5.4: Rimraf versions prior to v4 are no longer supported npm WARN deprecated rimraf@2.6.3: Rimraf versions prior to v4 are no longer supported npm WARN deprecated rimraf@2.7.1: Rimraf versions prior to v4 are no longer supported npm WARN deprecated rimraf@2.7.1: Rimraf versions prior to v4 are no longer supported npm WARN deprecated urix@0.1.0: Please see https://github.com/lydell/urix#deprecated npm WARN deprecated trim@0.0.1: Use String.prototype.trim() instead npm WARN deprecated har-validator@5.1.5: this library is no longer supported npm WARN deprecated npmlog@4.1.2: This package is no longer supported. npm WARN deprecated @humanwhocodes/config-array@0.13.0: Use @eslint/config-array instead npm WARN deprecated abab@2.0.6: Use your platform's native atob() and btoa() methods instead npm WARN deprecated rimraf@3.0.2: Rimraf versions prior to v4 are no longer supported npm WARN deprecated cryptiles@2.0.5: This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial). npm WARN deprecated mailcomposer@4.0.1: This project is unmaintained npm WARN deprecated resolve-url@0.2.1: https://github.com/lydell/resolve-url#deprecated npm WARN deprecated are-we-there-yet@1.1.7: This package is no longer supported. npm WARN deprecated date-format@1.2.0: 1.x is no longer supported. Please upgrade to 4.x or higher. npm WARN deprecated @humanwhocodes/object-schema@2.0.3: Use @eslint/object-schema instead npm WARN deprecated chromedriver@108.0.0: Chromedriver download url has changed. Use version 114.0.2 or newer. npm WARN deprecated glob@7.2.3: Glob versions prior to v9 are no longer supported npm WARN deprecated glob@7.2.3: Glob versions prior to v9 are no longer supported npm WARN deprecated glob@7.2.3: Glob versions prior to v9 are no longer supported npm WARN deprecated glob@7.2.3: Glob versions prior to v9 are no longer supported npm WARN deprecated glob@7.2.3: Glob versions prior to v9 are no longer supported npm WARN deprecated glob@7.2.3: Glob versions prior to v9 are no longer supported npm WARN deprecated glob@7.2.3: Glob versions prior to v9 are no longer supported npm WARN deprecated glob@7.2.3: Glob versions prior to v9 are no longer supported npm WARN deprecated glob@7.2.3: Glob versions prior to v9 are no longer supported npm WARN deprecated glob@7.2.3: Glob versions prior to v9 are no longer supported npm WARN deprecated glob@7.2.3: Glob versions prior to v9 are no longer supported npm WARN deprecated glob@7.2.3: Glob versions prior to v9 are no longer supported npm WARN deprecated glob@7.2.3: Glob versions prior to v9 are no longer supported npm WARN deprecated glob@7.2.3: Glob versions prior to v9 are no longer supported npm WARN deprecated glob@7.2.3: Glob versions prior to v9 are no longer supported npm WARN deprecated glob@8.1.0: Glob versions prior to v9 are no longer supported npm WARN deprecated glob@7.2.3: Glob versions prior to v9 are no longer supported npm WARN deprecated glob@7.2.3: Glob versions prior to v9 are no longer supported npm WARN deprecated glob@7.2.3: Glob versions prior to v9 are no longer supported npm WARN deprecated glob@7.2.3: Glob versions prior to v9 are no longer supported npm WARN deprecated glob@7.2.3: Glob versions prior to v9 are no longer supported npm WARN deprecated glob@7.2.3: Glob versions prior to v9 are no longer supported npm WARN deprecated source-map-resolve@0.5.3: See https://github.com/lydell/source-map-resolve#deprecated npm WARN deprecated circular-json@0.5.9: CircularJSON is in maintenance only, flatted is its successor. npm WARN deprecated domexception@2.0.1: Use your platform's native DOMException instead npm WARN deprecated glob@7.1.7: Glob versions prior to v9 are no longer supported npm WARN deprecated glob@7.1.7: Glob versions prior to v9 are no longer supported npm WARN deprecated glob@7.1.6: Glob versions prior to v9 are no longer supported npm WARN deprecated w3c-hr-time@1.0.2: Use your platform's native performance.now() and performance.timeOrigin. npm WARN deprecated q@1.4.1: You or someone you depend on is using Q, the JavaScript Promise library that gave JavaScript developers strong feelings about promises. They can almost certainly migrate to the native JavaScript promise now. Thank you literally everyone for joining me in this bet against the odds. Be excellent to each other. npm WARN deprecated npm WARN deprecated (For a CapTP with native promises, see @endo/eventual-send and @endo/captp) npm WARN deprecated domexception@4.0.0: Use your platform's native DOMException instead npm WARN deprecated socks@1.1.9: If using 2.x branch, please upgrade to at least 2.1.6 to avoid a serious bug with socket data flow and an import issue introduced in 2.1.0 npm WARN deprecated nodemailer@2.7.2: All versions below 4.0.1 of Nodemailer are deprecated. See https://nodemailer.com/status/ npm WARN deprecated multer@1.4.4: Multer 1.x is affected by CVE-2022-24434. This is fixed in v1.4.4-lts.1 which drops support for versions of Node.js before 6. Please upgrade to at least Node.js 6 and version 1.4.4-lts.1 of Multer. If you need support for older versions of Node.js, we are open to accepting patches that would fix the CVE on the main 1.x release line, whilst maintaining compatibility with Node.js 0.10. npm WARN deprecated boom@2.10.1: This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial). npm WARN deprecated sntp@1.0.9: This module moved to @hapi/sntp. Please make sure to switch over as this distribution is no longer supported and may contain bugs and critical security issues. npm WARN deprecated streamroller@0.7.0: 0.x is no longer supported. Please upgrade to 3.x or higher. npm WARN deprecated buildmail@4.0.1: This project is unmaintained npm WARN deprecated uuid@3.4.0: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details. npm WARN deprecated uuid@3.4.0: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details. npm WARN deprecated gauge@2.7.4: This package is no longer supported. npm WARN deprecated intl-messageformat-parser@1.8.1: We've written a new parser that's 6x faster and is backwards compatible. Please use @formatjs/icu-messageformat-parser npm WARN deprecated raven@2.6.4: Please upgrade to @sentry/node. See the migration guide https://bit.ly/3ybOlo7 npm WARN deprecated mailgun-js@0.7.15: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info. npm WARN deprecated node-uuid@1.4.8: Use uuid module instead npm WARN deprecated uuid@3.3.2: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details. npm WARN deprecated har-validator@2.0.6: this library is no longer supported npm WARN deprecated hoek@2.16.3: This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial). npm WARN deprecated mkdirp@0.5.1: Legacy versions of mkdirp are no longer supported. Please update to mkdirp 1.x. (Note that the API surface has changed to use Promises in 1.x.) npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142 npm WARN deprecated request@2.75.0: request has been deprecated, see https://github.com/request/request/issues/3142 npm WARN deprecated log4js@2.5.3: 2.x is no longer supported. Please upgrade to 6.x or higher. npm WARN deprecated hawk@3.1.3: This module moved to @hapi/hawk. Please make sure to switch over as this distribution is no longer supported and may contain bugs and critical security issues. npm WARN deprecated axios@0.15.3: Critical security vulnerability fixed in v0.21.1. For more information, see https://github.com/axios/axios/pull/3410 npm WARN deprecated puppeteer@22.7.1: < 22.8.2 is no longer supported npm WARN deprecated svgo@1.3.2: This SVGO version is no longer supported. Upgrade to v2.x.x. npm WARN deprecated protractor@7.0.0: We have news to share - Protractor is deprecated and will reach end-of-life by Summer 2023. To learn more and find out about other options please refer to this post on the Angular blog. Thank you for using and contributing to Protractor. https://goo.gle/state-of-e2e-in-angular npm WARN deprecated iltorb@2.4.5: The zlib module provides APIs for brotli compression/decompression starting with Node.js v10.16.0, please use it over iltorb npm WARN deprecated sinon@13.0.2: 16.1.1 npm WARN deprecated tslint-sonarts@1.9.0: Package no longer supported. Consider using eslint-plugin-sonarjs. npm WARN deprecated highlight.js@9.18.5: Support has ended for 9.x series. Upgrade to @latest npm WARN deprecated eslint@8.57.1: This version is no longer supported. Please see https://eslint.org/version-support for other options. npm WARN cleanup Failed to remove some directories [ npm WARN cleanup [ npm WARN cleanup '/Users/username/root-repo/packages/sub-repo/node_modules/sharp', npm WARN cleanup [Error: ENOTEMPTY: directory not empty, rmdir '/Users/username/root-repo/packages/sub-repo/node_modules/sharp'] { npm WARN cleanup errno: -66, npm WARN cleanup code: 'ENOTEMPTY', npm WARN cleanup syscall: 'rmdir', npm WARN cleanup path: '/Users/username/root-repo/packages/sub-repo/node_modules/sharp'' npm WARN cleanup } npm WARN cleanup ] npm WARN cleanup ] npm ERR! code 1 npm ERR! path /Users/username/root-repo/packages/sub-repo/node_modules/leveldown npm ERR! command failed npm ERR! command sh -c node-gyp-build npm ERR! CXX(target) Release/obj.target/leveldb/deps/leveldb/leveldb-1.20/db/builder.o npm ERR! gyp info it worked if it ends with ok npm ERR! gyp info using node-gyp@9.4.1 npm ERR! gyp info using node@20.9.0 | darwin | arm64 npm ERR! gyp info find Python using Python version 3.9.6 found at "/Library/Developer/CommandLineTools/usr/bin/python3" npm ERR! gyp info spawn /Library/Developer/CommandLineTools/usr/bin/python3 npm ERR! gyp info spawn args [ npm ERR! gyp info spawn args '/Users/username/root-repo/node_modules/node-gyp/gyp/gyp_main.py', npm ERR! gyp info spawn args 'binding.gyp', npm ERR! gyp info spawn args '-f', npm ERR! gyp info spawn args 'make', npm ERR! gyp info spawn args '-I', npm ERR! gyp info spawn args '/Users/username/root-repo/packages/sub-repo/node_modules/leveldown/build/config.gypi', npm ERR! gyp info spawn args '-I', npm ERR! gyp info spawn args '/Users/username/root-repo/node_modules/node-gyp/addon.gypi', npm ERR! gyp info spawn args '-I', npm ERR! gyp info spawn args '/Users/username/Library/Caches/node-gyp/20.9.0/include/node/common.gypi', npm ERR! gyp info spawn args '-Dlibrary=shared_library', npm ERR! gyp info spawn args '-Dvisibility=default', npm ERR! gyp info spawn args '-Dnode_root_dir=/Users/username/Library/Caches/node-gyp/20.9.0', npm ERR! gyp info spawn args '-Dnode_gyp_dir=/Users/username/root-repo/node_modules/node-gyp', npm ERR! gyp info spawn args '-Dnode_lib_file=/Users/username/Library/Caches/node-gyp/20.9.0/<(target_arch)/node.lib', npm ERR! gyp info spawn args '-Dmodule_root_dir=/Users/username/root-repo/packages/sub-repo/node_modules/leveldown', npm ERR! gyp info spawn args '-Dnode_engine=v8', npm ERR! gyp info spawn args '--depth=.', npm ERR! gyp info spawn args '--no-parallel', npm ERR! gyp info spawn args '--generator-output', npm ERR! gyp info spawn args 'build', npm ERR! gyp info spawn args '-Goutput_dir=.' npm ERR! gyp info spawn args ] npm ERR! gyp info spawn make npm ERR! gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ] npm ERR! In file included from ../deps/leveldb/leveldb-1.20/db/builder.cc:5: npm ERR! In file included from ../deps/leveldb/leveldb-1.20/db/builder.h:8: npm ERR! ../deps/leveldb/leveldb-1.20/include/leveldb/status.h:16:10: fatal error: 'string' file not found npm ERR! 16 | #include npm ERR! | ^~~~ npm ERR! 1 error generated. npm ERR! make: *** [Release/obj.target/leveldb/deps/leveldb/leveldb-1.20/db/builder.o] Error 1 npm ERR! gyp ERR! build error npm ERR! gyp ERR! stack Error: make failed with exit code: 2 npm ERR! gyp ERR! stack at ChildProcess.onExit (/Users/username/root-repo/node_modules/node-gyp/lib/build.js:203:23) npm ERR! gyp ERR! stack at ChildProcess.emit (node:events:514:28) npm ERR! gyp ERR! stack at ChildProcess._handle.onexit (node:internal/child_process:294:12) npm ERR! gyp ERR! System Darwin 23.6.0 npm ERR! gyp ERR! command "/Users/username/.nvm/versions/node/v20.9.0/bin/node" "/Users/username/root-repo/node_modules/.bin/node-gyp" "rebuild" npm ERR! gyp ERR! cwd /Users/username/root-repo/packages/sub-repo/node_modules/leveldown npm ERR! gyp ERR! node -v v20.9.0 npm ERR! gyp ERR! node-gyp -v v9.4.1 npm ERR! gyp ERR! not ok

npm ERR! A complete log of this run can be found in: /Users/username/.npm/_logs/2024-11-14T05_17_50_019Z-debug-0.log lerna ERR! npm install --legacy-peer-deps exited 1 in 'sub-repo' npm ERR! code 1 npm ERR! path /Users/username/root-repo npm ERR! command failed npm ERR! command sh -c lerna bootstrap --no-ci --loglevel verbose -- --legacy-peer-deps

cclauss commented 1 week ago

Please always provide the command that you typed.

Given the suggestions above (https://github.com/nodejs/node-gyp/issues/3093#issuecomment-2473924723), we need to know if you are installing leveldown, classic-level, or level.

@vweevers It would be helpful if the unmaintained repo that contains software that should no longer be used was archived.

Jy496 commented 1 week ago

Please always provide the command that you typed.

Given the suggestions above (#3093 (comment)), we need to know if you are installing leveldown, classic-level, or level.

@vweevers It would be helpful if the unmaintained repo that contains software that should no longer be used was archived.

@cclauss, none of the above packages are there in my package.json.

Jy496 commented 1 week ago

I am not trying to install any of the level package. I just tried npm install in my root repository, It is working fine for other packages repos(sub repo's) except one. @cclauss