npx pod install执行失败且node_modules为空的问题及解决方法
补充说明
我最终升级了iOS版本,通过Rosetta运行iTerm2后,pod install终于执行成功。此外我之前错误使用了npx pod install命令,正确的执行方式应为cd ios/ && pod install。
原问题描述
我在新笔记本上重新搭建React Native应用开发环境,执行npx pod install时遇到了如下报错:
npx pod install Need to install the following packages: pod Ok to proceed? (y) y npm WARN deprecated urix@0.1.0: Please see https://github.com/lydell/urix#deprecated npm WARN deprecated minimatch@2.0.10: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue npm WARN deprecated resolve-url@0.2.1: https://github.com/lydell/resolve-url#deprecated npm WARN deprecated chokidar@1.7.0: Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies. npm WARN deprecated fsevents@1.2.13: fsevents 1 will break on node v14+ and could be using insecure binaries. Upgrade to fsevents 2. npm WARN deprecated mkdirp@0.3.5: 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 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 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 connect@2.30.2: connect 2.x series is deprecated npm WARN deprecated coffee-script@1.8.0: CoffeeScript on NPM has moved to "coffeescript" (no hyphen) npm WARN deprecated core-js@1.2.7: core-js@<3.3 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Please, upgrade your dependencies to the actual version of core-js. npm ERR! code ENOENT npm ERR! syscall chmod npm ERR! path /Users/myuser/.npm/_npx/a0ca5f5666585aa2/node_modules/pod/node_modules/pm2/bin/pm2 npm ERR! errno -2 npm ERR! enoent ENOENT: no such file or directory, chmod '/Users/myuser/.npm/_npx/a0ca5f5666585aa2/node_modules/pod/node_modules/pm2/bin/pm2' npm ERR! enoent This is related to npm not being able to find a file. npm ERR! enoent npm ERR! A complete log of this run can be found in: npm ERR! /Users/myuser/.npm/_logs/2021-11-11T00_43_21_277Z-debug.log
我查看对应npx目录时,发现其下的node_modules文件夹为空,没有任何文件。
内容的提问来源于stack exchange,提问作者Martin Calvert
相关产品推荐
相关产品推荐

