React Native yarn ios error str.replace不是函数

oknrviil  于 2023-05-01  发布在  React
关注(0)|答案(1)|浏览(260)

在react native项目中,当yarn ios以下错误发生时,我该如何解决
错误字符串.replace不是一个函数.
yangseon-uui-MacBookPro:LearnReactNative yangseon-u$ yarn ios yarn run v1.22.19警告./package.json:没有许可证字段$ react-native run-ios warn找到多个Podfiles:ios/Podfile,vendor/bundle/ruby/2.6.0/gems/cocoapods-core-1.12.1/lib/cocoapods-core/Podfile.自动选择ios/Podfile。如果您想选择一个不同的,您可以通过“项目”配置它。ios.sourceDir”。你可以在这里了解更多:https://github.com/react-native-community/cli/blob/master/docs/configuration.md错误字符串。replace不是函数。TypeError:str.replace不是inlineString(/Users/yangseon-u/LearnReactNative/node_modules/@react-native-community/cli-tools/build/errors.js:25:33)at new CLIError(/Users/yangseon-u/LearnReactNative/node_modules/@react-native-community/cli-tools/build/errors.js:13:11)在getProjectInfo(/Users/yangseon-u/LearnReactNative/node_modules/@react-native-community/cli-platform-ios/build/tools/getProjectInfo.js:29:11)。runIOS [as func](/Users/yangseon-u/LearnReactNative/node_modules/@react-native-community/cli-platform-ios/build/commands/runIOS/index.82:58)在命令。handleAction(/Users/yangseon-u/LearnReactNative/node_modules/@react-native-community/cli/build/index.108:23)在命令。listener [as _actionHandler](/Users/yangseon-u/LearnReactNative/node_modules/commander/lib/command.js:482:17)at /Users/yangseon-u/LearnReactNative/node_modules/commander/lib/command。js:1283:65在命令。_chainOrCall(/Users/yangseon-u/LearnReactNative/node_modules/commander/lib/command.js:1177:12)在命令。_parseCommand(/Users/yangseon-u/LearnReactNative/node_modules/commander/lib/command.js:1283:27)at /Users/yangseon-u/LearnReactNative/node_modules/commander/lib/command。js:1081:27 info使用--verbose标志运行CLI以了解更多详细信息。
删除node_modules并安装yarn和升级,但仍然发生。..

ryoqjall

ryoqjall1#

看看你的项目。替换并检查输入参数,应接收undefined

相关问题