Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeError: [ios.xcodeproj]: withIosXcodeprojBaseMod: Cannot read properties of null (reading 'path') #3

Open
robertherber opened this issue Feb 21, 2023 · 5 comments

Comments

@robertherber
Copy link

I run into this error when running prebuild, not quite sure what is the next step. Any ideas?

TypeError: [ios.xcodeproj]: withIosXcodeprojBaseMod: Cannot read properties of null (reading 'path')
    at correctForPath (/Users/robertherber/code/schedulist/schedulist-app/node_modules/xcode/lib/pbxProject.js:1682:38)
    at correctForResourcesPath (/Users/robertherber/code/schedulist/schedulist-app/node_modules/xcode/lib/pbxProject.js:1672:12)
    at pbxProject.addResourceFile (/Users/robertherber/code/schedulist/schedulist-app/node_modules/xcode/lib/pbxProject.js:258:9)
    at /Users/robertherber/code/schedulist/schedulist-app/node_modules/expo-config-plugin-ios-share-extension/build/withShareExtensionXcodeTarget.js:37:20
    at async action (/Users/robertherber/code/schedulist/schedulist-app/node_modules/@expo/config-plugins/build/plugins/withMod.js:235:23)
    at async interceptingMod (/Users/robertherber/code/schedulist/schedulist-app/node_modules/@expo/config-plugins/build/plugins/withMod.js:126:21)
    at async interceptingMod (/Users/robertherber/code/schedulist/schedulist-app/node_modules/@expo/config-plugins/build/plugins/withMod.js:126:21)
    at async interceptingMod (/Users/robertherber/code/schedulist/schedulist-app/node_modules/@expo/config-plugins/build/plugins/withMod.js:126:21)
    at async interceptingMod (/Users/robertherber/code/schedulist/schedulist-app/node_modules/@expo/config-plugins/build/plugins/withMod.js:126:21)
    at async interceptingMod (/Users/robertherber/code/schedulist/schedulist-app/node_modules/@expo/config-plugins/build/plugins/withMod.js:126:21)
    at async interceptingMod (/Users/robertherber/code/schedulist/schedulist-app/node_modules/@expo/config-plugins/build/plugins/withMod.js:126:21)
    at async interceptingMod (/Users/robertherber/code/schedulist/schedulist-app/node_modules/@expo/config-plugins/build/plugins/withMod.js:126:21)
    at async interceptingMod (/Users/robertherber/code/schedulist/schedulist-app/node_modules/@expo/config-plugins/build/plugins/withMod.js:126:21)
    at async interceptingMod (/Users/robertherber/code/schedulist/schedulist-app/node_modules/@expo/config-plugins/build/plugins/withMod.js:126:21)
    at async action (/Users/robertherber/code/schedulist/schedulist-app/node_modules/@expo/config-plugins/build/plugins/createBaseMod.js:71:21)
    at async interceptingMod (/Users/robertherber/code/schedulist/schedulist-app/node_modules/@expo/config-plugins/build/plugins/withMod.js:126:21)
@CodingItWrong
Copy link

I think this is related to this open expo-cli issue: expo/expo-cli#4293

If/when that's fixed it may resolve this. But not sure of any workaround until then.

@timedtext
Copy link
Owner

This is a bug in xcode.
We need to use patch package to fix this.
I have tried to fix this here, but it doesn't work, you need to patch-package in your own project.

@matthijn
Copy link
Contributor

matthijn commented Mar 17, 2023

First off, thanks for making this package. A bunch of people seem to ask for it, but expo hasn't made one available so far.

I think it would be good if you add (for now) to the readme that the patch needs to be applied and which steps to take.

eg:

  • Run npm install --save-dev package-patch
  • copy this repo's patch folder to the root of the project
  • And add "postinstall": "patch-package" to the scripts section in package.json.

For me, currently, I also had to add an .npmrc file with contents:

legacy-peer-deps=true

Since in newer projects, the react versions changed, and this library still has it's dependency set to a previous version and npm install won't complete otherwise.

@CodingItWrong
Copy link

CodingItWrong commented Mar 17, 2023

@matthijn generic text support and reading incoming values aren't related to this GitHub Issue; I would recommend opening separate issues for those

@matthijn
Copy link
Contributor

matthijn commented Mar 17, 2023

Sorry, removed my other remarks and moved them to separate issues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants