react-native-version icon indicating copy to clipboard operation
react-native-version copied to clipboard

TypeError [ERR_INVALID_ARG_TYPE]

Open ocarreterom opened this issue 7 years ago • 4 comments

I have this error running: react-native-version

[RNV] Versioning Android...
[RNV] Android updated
[RNV] Versioning iOS...
[RNV] TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received type undefined
Usage: react-native-version [options] [projectPath]

React Native Info

React Native Environment Info:
    System:
      OS: macOS High Sierra 10.13.6
      CPU: x64 Intel(R) Core(TM) i5-2400S CPU @ 2.50GHz
      Memory: 18.00 MB / 16.00 GB
      Shell: 5.3 - /bin/zsh
    Binaries:
      Node: 10.9.0 - /usr/local/bin/node
      Yarn: 1.9.4 - /usr/local/bin/yarn
      npm: 6.2.0 - /usr/local/bin/npm
      Watchman: 4.9.0 - /usr/local/bin/watchman
    SDKs:
      iOS SDK:
        Platforms: iOS 11.4, macOS 10.13, tvOS 11.4, watchOS 4.3
      Android SDK:
        Build Tools: 23.0.1, 25.0.0, 25.0.2, 26.0.1, 26.0.2, 26.0.3, 27.0.0, 27.0.3
        API Levels: 23, 25, 26, 27
    IDEs:
      Android Studio: 3.1 AI-173.4907809
      Xcode: 9.4.1/9F2000 - /usr/bin/xcodebuild
    npmPackages:
      react: 16.5.0 => 16.5.0
      react-native: 0.57.0 => 0.57.0
    npmGlobalPackages:
      react-native-cli: 2.0.1
      react-native-git-upgrade: 0.2.7

ocarreterom avatar Sep 13 '18 15:09 ocarreterom

Same issue here, @ocarreterom did you resolve it ?

loiclouvet avatar Oct 22 '18 08:10 loiclouvet

How are you executing react-native-version? Is it installed globally, or are you running it from the project? Furthermore, can you provide a sample or an idea of your project directory structure?

stovmascript avatar Oct 30 '18 07:10 stovmascript

problem is this function returns undefined (as wel as the right filename)

function getPlistFilenames(xcode) {
	return unique(
		flattenDeep(
			xcode.document.projects.map(project => {
				return project.targets.filter(Boolean).map(target => {
					return target.buildConfigurationsList.buildConfigurations.map(
						config => {
							return config.ast.value.get("buildSettings").get("INFOPLIST_FILE")
								.text;
						}
					);
				});
			})
		)
	);
}

VPelt avatar Apr 01 '21 09:04 VPelt