NativeScript / NativeScript/nativescript-cli

Global variables not defined in CLI 8.8

Offen
#5,813 1 Kommentar 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

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

Beschreibung

Issue Description

After bumping packages, I found that some packages/plugins only work when I uninstall ns cli globally and install "nativescript": "8.7.2" (downgrade from cli 8.8).

Reproduction

https://github.com/asharghi/print-star-demo

  1. Clone and run with 'ns run iOS' with CLI 8.8
  2. Tap on "Test" button and see "Error" in the console log. ReferenceError: MTPrinterStar is not defined
  3. Uninstall CLI 8.8 and install CLI 8.7.2
  4. Run 'ns clean && ns run ios'
  5. Tap on "Test" button again and see "Success" in the console log
Relevant log output (if applicable)

No response

Environment
OS: macOS 14.6.1
CPU: (10) arm64 Apple M1 Max
Shell: /bin/zsh
node: 18.18.1
npm: 9.8.1
nativescript: Not Found

# android
java: 17.0.11
ndk: Not Found
apis: Not Found
build_tools: Not Found
system_images: Not Found

# ios
xcode: 15.3/15E204a
cocoapods: 1.15.2
python: 2.7.18
python3: 3.12.4
ruby: 2.7.8
platforms: 
  - DriverKit 23.4
  - iOS 17.4
  - macOS 14.4
  - tvOS 17.4
  - visionOS 1.1
  - watchOS 10.4
Dependencies
"dependencies": {
  "@nativescript-community/perms": "^2.3.3",
  "@nativescript/core": "~8.8.0",
  "@nativescript/theme": "^3.1.0",
  "nativescript": "8.7.2",
  "nativescript-permissions": "^1.3.12",
  "nativescript-print-star": "file:local_modules/nativescript-print-star-latest.tgz",
  "nativescript-vue": "~2.9.3"
},
"devDependencies": {
  "@nativescript/ios": "8.8.1",
  "@nativescript/types": "~8.8.0",
  "@nativescript/webpack": "~5.0.0",
  "@types/node": "~17.0.21",
  "nativescript-vue-template-compiler": "~2.9.3",
  "typescript": "~5.4.0",
  "vue": "~2.6.12"
}
Please accept these terms

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 mit der verknüpften print-star-Demo und reproduziere den iOS-Lauf mit CLI 8.8; vergleiche ihn anschließend mit CLI 8.7.2. Untersuche, wann das globale MTPrinterStar während des NativeScript iOS-Plugin-Ablaufs verfügbar wird; als abgeschlossen gilt die Aufgabe, wenn die Demo unter CLI 8.8 Success protokolliert, ohne dass ein Downgrade erforderlich ist.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

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

Neue Issues direkt in Ihr Postfach

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