NativeScript / NativeScript/nativescript-cli
Invalid `Podfile` file: syntax error, unexpected keyword_end
還沒有人認領這個 Issue。
- 主要語言
- JavaScript
- 星號
- 1.1k
- 分支
- 204
- 平均合併
- 1 天 9 小時
- 30 天內合併 PR
- 8
描述
Which platform(s) does your issue occur on?
- iOS
Please, provide the following version numbers that your issue occurs with:
- CLI: 5.4.2
- Cross-platform modules: 5.0.0
- Runtime(s): tns-ios: 5.4.2
- Plugins (the
demoapp created by runningnpm run postclone):
"dependencies": {
"nativescript-theme-core": "~1.0.4",
"nativescript-twilio-chat": "file:../src",
"tns-core-modules": "~5.4.0"
},
"devDependencies": {
"nativescript-dev-typescript": "~0.10.0",
"nativescript-dev-webpack": "~0.24.0"
},
Please, tell us how to recreate the issue in as much detail as possible.
sudo gem install cocoapods(if not already installed)mkdir plugin-testcd plugin-testgit clone https://github.com/NativeScript/nativescript-plugin-seed _plugins/nativescript-version-numbercd _plugins/nativescript-version-number/srcnpm run postclone- I entered
twilio-chatfor the plugin name and chose defaults (create ademoTypeScript app) - create the following
Podfilein_plugins/nativescript-version-number/src/platforms/ios(as per Twilio Programable Chat docs)
source 'https://github.com/CocoaPods/Specs'
target 'MyTarget' do
pod 'TwilioChatClient', '~> 2.4.2'
end
- replace
MyTargetwithdemo - in 2 terminal windows, both in
_plugins/nativescript-version-number/src, run: npm run plugin.tscwatchnpm run demo.ios
Result: [!] Invalid 'Podfile' file: syntax error, unexpected keyword_end, expecting end-of-input.
The generated Podfile (_plugins/nativescript-version-number/demo/platforms/ios/Podfile) looks like this:
use_frameworks!
target "demo" do
end
end
# Begin Podfile - /www/plugin-test/_plugins/nativescript-version-number/demo/node_modules/nativescript-twilio-chat/platforms/ios/Podfile
source 'https://github.com/CocoaPods/Specs'
target 'demo' do
pod 'TwilioChatClient', '~> 2.4.2'
end
# End Podfile
end
Removing the end in my Podfile, I still get the same error (and just one less end in the resulting Podfile).
At one point I even got a Duplicate target "demo" error, so I even tried removing the line target 'demo' do line from my Podfile, but still no luck, still got the [!] Invalid 'Podfile' file: syntax error, unexpected keyword_end, expecting end-of-input. error.
Even if I delete all content from my Podfile, to have it empty, I still get a bad resulting Podfile:
use_frameworks!
target "demo" do
end
end
# Begin Podfile - /www/plugin-testt/_plugins/nativescript-version-number/demo/node_modules/nativescript-twilio-chat/platforms/ios/Podfile
# End Podfile
end
貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
研究方向
先在 _plugins/nativescript-version-number/src/platforms/ios/Podfile 中重現問題,並將其與產生的 demo/platforms/ios/Podfile 進行比較。執行 npm run plugin.tscwatch 和 npm run demo.ios,然後追蹤 plugin Podfile 如何與 demo target 結合。產生的 Podfile 具有配對平衡的 target 區塊,且 iOS demo 命令在沒有語法錯誤的情況下完成,即表示完成。
由索引模型根據 Issue 內容生成。
評估
- 技術堆疊
- javascript
- 領域
- cli, mobile-dev
- Issue 類型
- 缺陷
- 難度
- 3/5
- 預估耗時
- 1-2 天
- 活躍度
- 停滯
- 描述清晰度
- 基本清楚
- 新手友好度
- 42/100