-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
"path must be a string or Buffer" when react-native link react-native-code-push #534
Comments
@StevePotter just tagging you on this issue (which is the same as #539) so that you can track it here! We are currently swamped, but I'll try to get onto this next week. |
I got the same issue when I run 'rnpm link react-native-code-push'. My ReactNative is 0.25.0, and CodePush is 1.11.0-beta. |
Thanks. It's a minor thing considering it was basically a noop. |
@StevePotter, @ljunb, @snowjade - I'm investigating this now and would love any information you could give about your setup. What is happening is that the linking script is looking for an For reference, here is the offending code:
|
/node_modules/react-native/local-cli/core/makeCommand.js:19 I'm a react native npm package author, also issue. Kennytian/react-native-instabug#14. @Silhouettes Please tell me what to fix this issue |
I'm having the same problem, and it's because my |
@snowjade, @ljunb, @StevePotter, it seems that Info.plist and AppDelegate.m aren't in the same folder. |
@Silhouettes Do CodePush need the ios folder ? I find the |
Hi, @Ge-yuan-jun, I've sent PR which fixes this issue. Could you pls check whether it works for you? |
@matrosov-nikita Hi, I have tried your pr. the commad do not show the |
@matrosov-nikita your code is great! In my React Ntive app,it works!Thanks for your time~ |
Closing this as the most of the edge cases mentioned above fixed in #639 |
I am seeing this now on |
@Jacse - that looks interesting. However I was not able to reproduce it with RN 0.44 and RNCP 2.0.3-beta. So could you please be more specific about your environment/project structure. Ideally you can share with us the minimum app where we can reproduce this case. |
@max-mironov my problem is probably just an edge-case, then. I just did a manual install instead. Side note: While doing so I noticed that the docs seem to be outdated. The instructions seem to vary from what |
@max-mironov this is the error I run into:
Might have to do with the double quotes. |
@Jacse thanks for this, the error should be relative to double quotes in path name. Is it possible for you to verify this (open project.pbxproj file in editor and share with us value for INFOPLIST_FILE key). If our assumptions are correct we will prepare PR to fix this case. Please let us know what you find out. |
same as @Jacse , noticed the double quotes under the file path string in the console output errors while I tried to link some plugin.
|
@ngxiaoyi - got it, thanks, could you please share with us the contents of your project.pbxproj file or the value of INFOPLIST_FILE key from pbxproj? |
@max-mironov Sorry I only got back with this now. My
You can see the tvOS values have quotes. |
@Jacse - thanks for this, will fix this case for |
@max-mironov I can confirm your fix works, it now links successfully. |
… build (#861) * Fixed issue with error on parsing plist path See #534 (comment) for details * Fixed issue with [Android] restartApp() throwing exception w/ release build #847 * Changed return value to null for getUpdateMetadata instead of empty string In accordance with docs and #862 * Code refactoring: moved variable assignment out of loop
* Fixed issue with error on parsing plist path See #534 (comment) for details * Changed return value to null for getUpdateMetadata instead of empty string In accordance with docs and #862
`Xiang-mbp:example-seller-app Xiang$ react-native link react-native-code-push
rnpm-install info Android module react-native-code-push is already linked
rnpm-install info iOS module react-native-code-push is already linked
fs.js:640
return binding.open(pathModule._makeLong(path), stringToFlags(flags), mode);
^
TypeError: path must be a string or Buffer
at TypeError (native)
at Object.fs.openSync (fs.js:640:18)
at Object.fs.readFileSync (fs.js:508:33)
at Object. (/Users/Xiang/AndroidStudioProjects/MajorDevelopApplication/example-seller-app/node_modules/react-native-code-push/scripts/postlink/ios/postlink.js:13:24)
at Module._compile (module.js:556:32)
at Object.Module._extensions..js (module.js:565:10)
at Module.load (module.js:473:32)
at tryModuleLoad (module.js:432:12)
at Function.Module._load (module.js:424:3)
at Module.require (module.js:483:17)
/Users/Xiang/AndroidStudioProjects/MajorDevelopApplication/example-seller-app/node_modules/react-native/local-cli/rnpm/core/src/makeCommand.js:19
throw new Error(
Error occured during executing "${ command }" command
);^
Error: Error occured during executing "node node_modules/react-native-code-push/scripts/postlink/run" command
at ChildProcess.prelink (/Users/Xiang/AndroidStudioProjects/MajorDevelopApplication/example-seller-app/node_modules/react-native/local-cli/rnpm/core/src/makeCommand.js:19:15)
at emitTwo (events.js:106:13)
at ChildProcess.emit (events.js:191:7)
at maybeClose (internal/child_process.js:852:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:215:5)
Xiang-mbp:example-seller-app Xiang$
`
The text was updated successfully, but these errors were encountered: