codebytere / codebytere/node-mac-permissions

Support for cross platform projects

Offen
#64 3 Kommentare 1 Reaktion 0 zugewiesene Personen Auf GitHub ansehen
Vorherrschende Sprache
Objective-C++
Sterne
240
Forks
49
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

I am developing an application that is prepared to work on Windows, Mac, and Linux with the same code, of course, Mac requests permissions that do not exist in the other operating systems and that is why I am using this library.

However, when I try to run `npm install` on the project on a Windows or a Linux device, there is an error saying that this library is incompatible:
```
C:\GitHub\cross>npm install
npm ERR! code EBADPLATFORM
npm ERR! notsup Unsupported platform for node-mac-permissions@2.3.0: wanted {"os":"darwin"} (current: {"os":"win32","arch":"x64"})
npm ERR! notsup Valid OS: darwin
npm ERR! notsup Valid Arch: undefined
npm ERR! notsup Actual OS: win32
npm ERR! notsup Actual Arch: x64

npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Koraniar\AppData\Local\npm-cache\_logs\2023-09-04T21_41_03_261Z-debug-0.log
```

-
I know I can force the installation using `npm install --force`, but there are some side effects I would like to avoid like having version conflicts, bypassing security vulnerabilities, etc.

Is there a way to allow this library to be installed in different operating systems? Like allowing it to be installed and do nothing once it is imported If the platform is not darwin like [mac-screen-capture-permissions](https://github.com/karaggeorge/mac-screen-capture-permissions).

Beitragsleitfaden

Für dieses Repository ist kein Beitragsleitfaden indexiert

Rechercherichtung

Beginne mit den Paketmetadaten hinter npms nur für darwin geltender Plattformprüfung und vergleiche das Installationsverhalten mit mac-screen-capture-permissions. Als erledigt gilt die Aufgabe, wenn npm install unter Windows und Linux erfolgreich ist, der Import der Bibliothek dort sicher nichts tut und das Verhalten unter macOS weiterhin verfügbar ist.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
macos, nodejs
Bereich
operating-systems
Issue-Typ
Feature
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.