NativeScript / NativeScript/plugins
[nativescript/localize] It cannot be installed in a site where there is no NS
Offen
Dieses Issue hat noch niemand übernommen.
- Vorherrschende Sprache
- TypeScript
- Sterne
- 206
- Forks
- 123
- Ø Merge
- 2 T. 1 Std.
- Gemergte PRs (30 T.)
- 1
Beschreibung
I want to install it in a monorepo package outside the NS app but it gives an error when trying to install, I think it would be nice to be able to accept this
npm ERR! code 1
npm ERR! path C:\wordspaces\ns\monorepo\packages\core\core-native\node_modules\@nativescript\localize
npm ERR! command failed
npm ERR! command C:\Windows\system32\cmd.exe /d /s /c node postinstall
npm ERR! node:internal/modules/cjs/loader:936
npm ERR! throw err;
npm ERR! ^
npm ERR!
npm ERR! Error: Cannot find module '@nativescript/hook'
npm ERR! Require stack:
npm ERR! - C:\wordspaces\ns\monorepo\packages\core\core-native\node_modules\@nativescript\localize\postinstall.js
npm ERR! at Function.Module._resolveFilename (node:internal/modules/cjs/loader:933:15)
npm ERR! at Function.Module._load (node:internal/modules/cjs/loader:778:27)
npm ERR! at Module.require (node:internal/modules/cjs/loader:1005:19)
npm ERR! at require (node:internal/modules/cjs/helpers:94:18)
npm ERR! at Object.<anonymous> (C:\wordspaces\ns\monorepo\packages\core\core-native\node_modules\@nativescript\localize\postinstall.js:1:1)
npm ERR! at Module._compile (node:internal/modules/cjs/loader:1101:14)
npm ERR! at Object.Module._extensions..js (node:internal/modules/cjs/loader:1153:10)
npm ERR! at Module.load (node:internal/modules/cjs/loader:981:32)
npm ERR! at Function.Module._load (node:internal/modules/cjs/loader:822:12)
npm ERR! at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:79:12) {
npm ERR! code: 'MODULE_NOT_FOUND',
npm ERR! requireStack: [
npm ERR! 'C:\\wordspaces\\ns\\monorepo\\packages\\core\\core-native\\node_modules\\@nativescript\\localize\\postinstall.js'
npm ERR! ]
npm ERR! }
Beitragsleitfaden
Erste Schritte
- Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
- Forke das Repository und arbeite in einem Branch.
- Öffne einen Pull Request, der die Issue-Nummer nennt.
Rechercherichtung
Reproduziere die Installation aus einem Monorepo-Paket ohne eine NativeScript-App und untersuche anschließend postinstall.js und dessen Verwendung von @nativescript/hook. Bestätige das erwartete Verhalten für diesen Kontext und verifiziere, dass die npm-Installation nicht mehr mit MODULE_NOT_FOUND fehlschlägt.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- node.js, typescript
- Bereich
- build-system
- Issue-Typ
- Bug
- Schwierigkeit
- 3/5
- Geschätzter Aufwand
- 1-2 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 35/100