Closed
Description
I tried to run react-native link after running npm install, this was working fine before now I got this error
ERR! It seems something went wrong while linking. Error: Expected "/* Begin ", "/* End ", "\"" or [A-Za-z0-9_.] but "<" found. Please file an issue here: https://github.com/facebook/react-native/issues
What causes this error?
Metadata
Metadata
Assignees
Type
Projects
Milestone
Relationships
Development
No branches or pull requests
Activity
st0ffern commentedon Apr 12, 2017
what libs are you linking? and please provide full error log
Fantasim commentedon Apr 12, 2017
Hi,
I got the same error ! and i cannot open my xcode project now.
Kureev commentedon Apr 12, 2017
@Fantasim you can always use
git checkout -- <yourproj>.xcodeproj
to reset this change.@EgaSetya @Fantasim Can you provide us a name of the library that causes this issue? Without it, we can't do anything.
naoey commentedon Apr 12, 2017
Just encountered the same error. It seems to be caused by a corrupt .xcodeproj file because the linking fails on the first iOS module it encounters.
@Fantasim @EgaSetya we were able to fix it by checking out an older version of the .xcodeproj file that worked and then ran link again.
st0ffern commentedon Apr 12, 2017
As @Kureev said, please provide the name of the library you use and full log.
right now it looks like there is a problem with the library you are linking itself and not react-native.
Until we see what library or error this is we can not do anything.
naoey commentedon Apr 13, 2017
It's not specific to any library. I deleted the libs one by one to confirm this and the problem still occured.
As I said, it seems to be purely because of the corrupt .xcodeproj file. Android modules were still linking fine, it failed on the first iOS module in the alphabetical order of installed libs. Restoring the .xcodeproj to the last non-corrupt version fixed it with the same set of installed libs.
EgaSetya commentedon Apr 13, 2017
@Stoffern @Kureev Where can I find full error log? I only got 2 line of error when running "react-native link" on terminal
@naoey I tried running "git checkout -- myproject.xcodeproj" and got this error
error: pathspec 'Pictalogi.xcodeproj' did not match any file(s) known to git.
naoey commentedon Apr 13, 2017
You need to give the full path, which will be ios/Pictalogi.xcodeproj
If you've already committed the corrupt file you need to specify a previous commit revision when checking out.
EgaSetya commentedon Apr 13, 2017
@naoey I haven't committed the file yet and I already try as you suggested but it caused the same error.
Kureev commentedon Apr 14, 2017
Can you share the diff of corrupted file so we can check where
react-native link
corrupts it?I'm very sorry for this experience. I didn't experience this issue so far, so I need your assistance in order to fix it fast and efficiently. Please, be patient. Once we have a diff, we can find the right spot in the code that breaks it out.
dillonykyang commentedon Apr 17, 2017
I have the issue with this library https://github.com/xinthink/react-native-material-kit
These lines (diff) are causing the error:
EgaSetya commentedon Apr 19, 2017
@Kureev @Stoffern I got so many line diff on my project.pbxproj(link to file). Do I have to fix this manually?
ncuillery commentedon Apr 19, 2017
@dillonykyang I had a similar issue.
Before using the link command, change all the
HEADER_SEARCH_PATHS
that have a mono-string valueto a multi-string value:
The link command should work properly now.
ncuillery commentedon Apr 19, 2017
@EgaSetya Yes, you do. You'll find some useful information in this thread #12261, starting from this post: #12261 (comment)
30 remaining items