npm / cli

the package manager for JavaScript
https://docs.npmjs.com/cli/
Other
8.33k stars 3.06k forks source link

Missing dependency #6061

Closed RPalis closed 1 year ago

RPalis commented 1 year ago

Hi Thre I'm trying to install Strapi and I'm receiving the following error:

raquelsantospalis@Raquels-iMac ~ % npx create-strapi-app@latest my-project --quickstart Need to install the following packages: create-strapi-app@4.5.6 Ok to proceed? (y) y Creating a quickstart project. Creating a new Strapi application at /Users/raquelsantospalis/my-project. Creating files. ⠇ Installing dependencies: npm WARN config Default value does install option⠹ Installing dependencies: gyp info spawn args '/Users/raquelsantospalis/my-project/node_modules/better-sqlite3/build/config.gypi', npm ERR! gyp info spawn args '-I', npm ERR! gyp info spawn args '/usr/local/lib/node_modules/npm/node_modules/node-gyp/addon.gypi', npm ERR! gyp info spawn args '-I', npm ERR! gyp info spawn args '/Users/raquelsantospalis/Library/Caches/node-gyp/18.13.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/raquelsantospalis/Library/Caches/node-gyp/18.13.0', npm ERR! gyp info spawn args '-Dnode_gyp_dir=/usr/local/lib/node_modules/npm/node_modules/node-gyp', npm ERR! gyp info spawn args '-Dnode_lib_file=/UseError while installing dependencies: npm WARN config production Use --omit=dev instead. npm WARN config optional Use --omit=optional to exclude optional dependencies, or npm WARN config --include=optional to include them. npm WARN config npm WARN config Default value does install optional deps unless otherwise omitted. npm WARN deprecated urix@0.1.0: Please see https://github.com/lydell/urix#deprecated npm WARN deprecated source-map-url@0.4.1: See https://github.com/lydell/source-map-url#deprecated npm WARN deprecated resolve-url@0.2.1: https://github.com/lydell/resolve-url#deprecated npm WARN deprecated source-map-resolve@0.5.3: See https://github.com/lydell/source-map-resolve#deprecated npm WARN deprecated mini-create-react-context@0.4.1: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info. npm WARN deprecated querystring@0.2.0: The querystring API is considered Legacy. new code should use the URLSearchParams API instead. npm WARN deprecated mailcomposer@3.12.0: This project is unmaintained npm WARN deprecated buildmail@3.10.0: This project is unmaintained npm WARN deprecated har-validator@5.1.5: this library is no longer supported npm WARN deprecated formidable@1.2.6: Please upgrade to latest, formidable@v2 or formidable@v3! Check these notes: https://bit.ly/2ZEqIau npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142 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 ERR! code 1 npm ERR! path /Users/raquelsantospalis/my-project/node_modules/better-sqlite3 npm ERR! command failed npm ERR! command sh -c -- prebuild-install || npm run build-release npm ERR! > better-sqlite3@7.4.6 build-release npm ERR! > node-gyp rebuild --release npm ERR! prebuild-install warn install No prebuilt binaries found (target=18.13.0 runtime=node arch=x64 libc= platform=darwin) npm ERR! gyp info it worked if it ends with ok npm ERR! gyp info using node-gyp@9.1.0 npm ERR! gyp info using node@18.13.0 | darwin | x64 npm ERR! gyp info find Python using Python version 3.11.1 found at "/usr/local/bin/python3" npm ERR! gyp http GET https://nodejs.org/download/release/v18.13.0/node-v18.13.0-headers.tar.gz npm ERR! gyp http 200 https://nodejs.org/download/release/v18.13.0/node-v18.13.0-headers.tar.gz npm ERR! gyp http GET https://nodejs.org/download/release/v18.13.0/SHASUMS256.txt npm ERR! gyp http 200 https://nodejs.org/download/release/v18.13.0/SHASUMS256.txt npm ERR! gyp info spawn /usr/local/bin/python3 npm ERR! gyp info spawn args [ npm ERR! gyp info spawn args '/usr/local/lib/node_modules/npm/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/raquelsantospalis/my-project/node_modules/better-sqlite3/build/config.gypi', npm ERR! gyp info spawn args '-I', npm ERR! gyp info spawn args '/usr/local/lib/node_modules/npm/node_modules/node-gyp/addon.gypi', npm ERR! gyp info spawn args '-I', npm ERR! gyp info spawn args '/Users/raquelsantospalis/Library/Caches/node-gyp/18.13.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/raquelsantospalis/Library/Caches/node-gyp/18.13.0', npm ERR! gyp info spawn args '-Dnode_gyp_dir=/usr/local/lib/node_modules/npm/node_modules/node-gyp', npm ERR! gyp info spawn args '-Dnode_lib_file=/Users/raquelsantospalis/Library/Caches/node-gyp/18.13.0/<(target_arch)/node.lib', npm ERR! gyp info spawn args '-Dmodule_root_dir=/Users/raquelsantospalis/my-project/node_modules/better-sqlite3', 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! No receipt for 'com.apple.pkg.CLTools_Executables' found at '/'. npm ERR! npm ERR! No receipt for 'com.apple.pkg.DeveloperToolsCLILeo' found at '/'. npm ERR! npm ERR! No receipt for 'com.apple.pkg.DeveloperToolsCLI' found at '/'. npm ERR! npm ERR! gyp info spawn make npm ERR! gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ] npm ERR! xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun npm ERR! gyp ERR! build error npm ERR! gyp ERR! stack Error: make failed with exit code: 1 npm ERR! gyp ERR! stack at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:201:23) npm ERR! gyp ERR! stack at ChildProcess.emit (node:events:513:28) npm ERR! gyp ERR! stack at ChildProcess._handle.onexit (node:internal/child_process:291:12) npm ERR! gyp ERR! System Darwin 21.4.0 npm ERR! gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild" "--release" npm ERR! gyp ERR! cwd /Users/raquelsantospalis/my-project/node_modules/better-sqlite3 npm ERR! gyp ERR! node -v v18.13.0 npm ERR! gyp ERR! node-gyp -v v9.1.0 npm ERR! gyp ERR! not ok

npm ERR! A complete log of this run can be found in: npm ERR! /Users/raquelsantospalis/.npm/_logs/2023-01-16T21_12_47_945Z-debug-0.log

Keep trying!

Oh, it seems that you encountered errors while installing dependencies in your project. Don't give up, your project was created correctly. Fix the issues mentioned in the installation errors and try to run the following command:

cd /Users/raquelsantospalis/my-project && npm install

npm notice npm notice New major version of npm available! 8.19.3 -> 9.3.0 npm notice Changelog: https://github.com/npm/cli/releases/tag/v9.3.0 npm notice Run npm install -g npm@9.3.0 to update! npm notice raquelsantospalis@Raquels-iMac ~ % && npm install

The solution indicates to Dependency installation. But which ones? How?

Thank you so much for help me! Kindest Raquel Palis rsantosp@generalsw.com

ljharb commented 1 year ago

This is an issue with create-strapi-app, and not with npm. You may want to file it on their repo.