NativeScript / NativeScript/nativescript-cli

Plugin update won't work with locally developed plugin

Offen
#3,519 2 Kommentare 1 Reaktion 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

plugins to-be-checked
Vorherrschende Sprache
JavaScript
Sterne
1.1k
Forks
204
Ø Merge
1 T. 9 Std.
Gemergte PRs (30 T.)
8

Beschreibung

Hello,

Description

I created a tns app with tns create MyTnsApp --tsc and a plugin (with nativescript-plugin-seed) for it and put it to the plugins folder.

Here is the directory tree:

├── app
│   ├── package.json
│   └── <other files>
├── hooks
│   └── < ... >
├── node_modules
│   └── < ... >
├── package.json
├── platforms
│   └── < ... >
└── plugins
    └── nativescript-myplugin
        └── src
            ├── package.json
            └── < ... >

I can successfully add the plugin via: tns plugin add plugins/nativescript-myplugin/src/

I can successfully remove the plugin via: tns plugin remove nativescript-myplugin

The problem

Using tns plugin update nativescript-myplugin removes the plugin I want but it tries to get the source from https://registry.npmjs.org/nativescript-myplugin which drops a 404 error, of course.
So, the install fails.

Using tns plugin update plugins/nativescript-myplugin/src/ says "Plugin "plugins/nativescript-myplugin/src/" is not installed."

The expectation

I would like to update my plugin even if I develop it locally.
Either giving the path of the plugin or the name of it,update should work without a problem.

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 Verhalten mit tns plugin add plugins/nativescript-myplugin/src/ zu reproduzieren, und führe dann sowohl tns plugin update nativescript-myplugin als auch den pfadbasierten Update-Befehl aus. Verfolge den CLI-Einstiegspunkt von tns plugin update und vergleiche, wie installierte lokale Plugins aufgezeichnet und aufgelöst werden. Erledigt ist die Aufgabe, wenn das lokale Plugin nach Name oder Pfad aktualisiert werden kann, ohne ein nicht verfügbares npm-Paket abzurufen.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

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

Neue Issues direkt in Ihr Postfach

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