NativeScript / NativeScript/nativescript-cli
Invalid `Podfile` file: syntax error, unexpected keyword_end
Chưa có ai nhận issue này.
- Ngôn ngữ chính
- JavaScript
- Star
- 1.1k
- Fork
- 204
- Merge trung bình
- 1 ngày 9 giờ
- Pull request đã merge (30 ngày)
- 8
Mô tả
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
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Hướng nghiên cứu
Bắt đầu bằng cách tái hiện vấn đề trong _plugins/nativescript-version-number/src/platforms/ios/Podfile và so sánh với demo/platforms/ios/Podfile được tạo. Chạy npm run plugin.tscwatch và npm run demo.ios, sau đó truy vết cách Podfile của plugin được kết hợp với demo target. Công việc được hoàn tất khi Podfile được tạo có các khối target cân bằng và lệnh demo iOS hoàn tất mà không có lỗi cú pháp.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- javascript
- Lĩnh vực
- cli, mobile-dev
- Loại issue
- Lỗi
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức độ hoạt động
- Đình trệ
- Độ rõ ràng
- Khá rõ ràng
- Mức phù hợp với người mới
- 42/100