NativeScript / NativeScript/nativescript-cli

Invalid `Podfile` file: syntax error, unexpected keyword_end

Offen
#4,760 4 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

bug build CocoaPods
Vorherrschende Sprache
JavaScript
Sterne
1.1k
Forks
204
Ø Merge
1 T. 9 Std.
Gemergte PRs (30 T.)
8

Beschreibung

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 demo app created by running npm 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-test
  • cd plugin-test
  • git clone https://github.com/NativeScript/nativescript-plugin-seed _plugins/nativescript-version-number
  • cd _plugins/nativescript-version-number/src
  • npm run postclone
  • I entered twilio-chat for the plugin name and chose defaults (create a demo TypeScript app)
  • create the following Podfile in _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 MyTarget with demo
  • in 2 terminal windows, both in _plugins/nativescript-version-number/src, run:
  • npm run plugin.tscwatch
  • npm 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

Beitragsleitfaden

Beitragsleitfaden öffnen

Erste Schritte

  1. Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
  3. Forke das Repository und arbeite in einem Branch.
  4. Öffne einen Pull Request, der die Issue-Nummer nennt.

Rechercherichtung

Beginne damit, das Problem in _plugins/nativescript-version-number/src/platforms/ios/Podfile zu reproduzieren, und vergleiche es mit der generierten demo/platforms/ios/Podfile. Führe npm run plugin.tscwatch und npm run demo.ios aus und verfolge anschließend, wie die Plugin-Podfile mit dem Demo-Target kombiniert wird. Fertig ist die Aufgabe, wenn die generierte Podfile ausgeglichene Target-Blöcke enthält und der iOS-Demo-Befehl ohne Syntaxfehler abgeschlossen wird.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
javascript
Bereich
cli, mobile-dev
Issue-Typ
Bug
Schwierigkeit
3/5
Geschätzter Aufwand
1-2 Tage
Aktivitätsstatus
Veraltet
Klarheit
Größtenteils klar
Anfängerfreundlichkeit
42/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.