matejkriz / react-native-today-widget

iOS Today Widget in React Native
Other
418 stars 24 forks source link

Unable to install with yarn: Could not write domain #3

Closed joncursi closed 7 years ago

joncursi commented 7 years ago
$ yarn add react-native-today-widget
yarn add v0.24.5
[1/5] πŸ”  Resolving packages...
[2/5] 🚚  Fetching packages...
[3/5] πŸ”—  Linking dependencies...
[4/5] πŸ“ƒ  Building fresh packages...
[-/8] ⠈ waiting...
[-/8] ⠈ waiting...
[8/8] ⠈ react-native-today-widget: setting ".TodayWidgetExtension" as CFBundleIdentifier for  /../ios/TodayW
[-/8] ⠈ waiting...
error /Users/jcursi/Sites/joncursi/redbirdNative/node_modules/react-native-today-widget: Command failed.
Exit code: 1
Command: sh
Arguments: -c ./bin/setBundleId.sh
Directory: /Users/jcursi/Sites/joncursi/redbirdNative/node_modules/react-native-today-widget
Output:
./bin/setBundleId.sh: line 3: realpath: command not found
usage: dirname path
sed: 1: "s/^\s*"name": "(.*?)",$ ...": RE error: repetition-operator operand invalid
Reading CFBundleIdentifier from: /../../../ios//Info.plist
2017-07-10 16:34:36.024 defaults[29636:174124] 
The domain/default pair of (/../../../ios//Info.plist, CFBundleIdentifier) does not exist
setting ".TodayWidgetExtension" as CFBundleIdentifier for  /../ios/TodayWidgetExtension/Info.plist
2017-07-10 16:34:36.184 defaults[29645:174193] Could not write domain /../ios/TodayWidgetExtension/Info.plist; exiting
info Visit https://yarnpkg.com/en/docs/cli/add for documentation about this command.
joncursi commented 7 years ago

Ran the command again and it worked. Out of curiosity, I ran it a 3rd time, and it failed. Seems like it alternates every other between success and failure. Can this be updated to install more reliably? Our CI systems are going to drive us crazy!

joncursi commented 7 years ago

Seems like its a permission issue on https://github.com/matejkriz/react-native-today-widget/blob/master/ios/TodayWidgetExtension/Info.plist ?

See: https://discussions.apple.com/thread/1979027?start=0&tstart=0

screen shot 2017-07-10 at 4 44 55 pm

joncursi commented 7 years ago

I even tried this on a brand new Macbook Pro to double check that it wasn't something on my old machine:

$ yarn add react-native-today-widget
error /Users/joncursi/Sites/joncursi/redbirdNative/node_modules/react-native-today-widget: Command failed.
Exit code: 1
Command: sh
Arguments: -c ./bin/setBundleId.sh
Directory: /Users/joncursi/Sites/joncursi/redbirdNative/node_modules/react-native-today-widget
Output:
./bin/setBundleId.sh: line 3: realpath: command not found
usage: dirname path
sed: 1: "s/^\s*"name": "(.*?)",$ ...": RE error: repetition-operator operand invalid
Reading CFBundleIdentifier from: /../../../ios//Info.plist
2017-08-11 17:29:29.647 defaults[31957:256937] 
The domain/default pair of (/../../../ios//Info.plist, CFBundleIdentifier) does not exist
setting ".TodayWidgetExtension" as CFBundleIdentifier for  /../ios/TodayWidgetExtension/Info.plist
2017-08-11 17:29:29.677 defaults[31958:256941] Could not write domain /../ios/TodayWidgetExtension/Info.plist; exiting
matejkriz commented 7 years ago

I will replace realpath in postinstall script soon, but for now, you need to install coreutils. I'm sorry that I missed it in documentation.

https://github.com/matejkriz/react-native-today-widget#dependencies

matejkriz commented 7 years ago

Should be fixed in 0.7.1

Please retest it with new version and reopen this issue if the problem is still there.