codebytere / codebytere/node-mac-permissions

Support for cross platform projects

オープン
#64 コメント 3 件 リアクション 1 件 担当者 0 名 GitHub で見る
主要言語
Objective-C++
スター
240
フォーク
49
PR マージ指標
30日以内にマージされた PR はありません

説明

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).

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

調査の方向性

npm の darwin 専用プラットフォームチェックの背後にあるパッケージメタデータから始め、mac-screen-capture-permissions とインストール動作を比較します。npm install が Windows と Linux で成功し、そこでライブラリを安全にインポートしても何もせず、macOS の動作が引き続き利用できれば完了です。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
macos, nodejs
領域
operating-systems
issue の種類
機能追加
難易度
3/5
見積もり時間
1〜2日
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
35/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。