Closed code-r-man closed 10 months ago
Interestingly version 2.3.0
does not cause this issue - it starts happening at version 3.0.0
and above.
Hi @code-r-man π
older versions of nut.js do not include this optional dependency that is only relevant on macOS. Code wise it is also guarded that it shouldn't get required on other platforms, so I'm wondering what Webpack is doing here. This is the first report of this behaviour, so I'd have to take a closer look.
Best regards
Simon
I am having the same issue. Those packages cannot be installed since it is an unsupported platform (Windows but it needs mac to install it)
npm ERR! notsup Unsupported platform for @nut-tree/node-mac-permissions@2.2.1: wanted {"os":"darwin"} (current: {"os":"win32"})
any updates on this?
Hi @JuraJuki π
in that case nothing will happen from a nut.js perspective.
@nut-tree/node-mac-permissions
is an optional dependency and does not cause installation to fail.
If this is not properly handled in the WebPack build itβs a WebPack problem.
Version 3.1.2
Short overview When trying to bundle the library using Webpack the process fails with multiple errors.
Issue occurs on
node version: 14.21.3
OS type and version: Windows 10
Detailed error description
Full code sample to reproduce Import the library in a file (
index.js
) like so:const { keyboard, Key } = require("@nut-tree/nut-js");
and try to bundle it using Webpack:npm install webpack webpack-cli --save-dev
npm i @nut-tree/nut-js --save
npx webpack-cli build --entry ./index.js --target electron-main --output-path ./index.min.js --mode production
Additional content