Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

@swc/core install warning: platform "darwin" is incompatible with this module #2374

Closed
tarngerine opened this issue Oct 7, 2021 · 14 comments
Labels

Comments

@tarngerine
Copy link

Describe the bug
When running yarn, @swc/core (1.2.93) always throws a warning:

04:51:27 PM ❯ yarn
yarn install v1.22.15
[1/4] πŸ”  Resolving packages...
[2/4] 🚚  Fetching packages...
info @swc/core-win32-x64-msvc@1.2.93: The platform "darwin" is incompatible with this module.
info "@swc/core-win32-x64-msvc@1.2.93" is an optional dependency and failed compatibility check. Excluding it from installation.
info @swc/core-linux-x64-gnu@1.2.93: The platform "darwin" is incompatible with this module.
info "@swc/core-linux-x64-gnu@1.2.93" is an optional dependency and failed compatibility check. Excluding it from installation.
info @swc/core-linux-x64-musl@1.2.93: The platform "darwin" is incompatible with this module.
info "@swc/core-linux-x64-musl@1.2.93" is an optional dependency and failed compatibility check. Excluding it from installation.
info @swc/core-android-arm64@1.2.93: The platform "darwin" is incompatible with this module.
info "@swc/core-android-arm64@1.2.93" is an optional dependency and failed compatibility check. Excluding it from installation.
info @swc/core-android-arm64@1.2.93: The CPU architecture "x64" is incompatible with this module.
info @swc/core-linux-arm64-gnu@1.2.93: The platform "darwin" is incompatible with this module.
info "@swc/core-linux-arm64-gnu@1.2.93" is an optional dependency and failed compatibility check. Excluding it from installation.
info @swc/core-linux-arm64-gnu@1.2.93: The CPU architecture "x64" is incompatible with this module.
info @swc/core-win32-ia32-msvc@1.2.93: The platform "darwin" is incompatible with this module.
info "@swc/core-win32-ia32-msvc@1.2.93" is an optional dependency and failed compatibility check. Excluding it from installation.
info @swc/core-win32-ia32-msvc@1.2.93: The CPU architecture "x64" is incompatible with this module.
info @swc/core-linux-arm-gnueabihf@1.2.93: The platform "darwin" is incompatible with this module.
info "@swc/core-linux-arm-gnueabihf@1.2.93" is an optional dependency and failed compatibility check. Excluding it from installation.
info @swc/core-linux-arm-gnueabihf@1.2.93: The CPU architecture "x64" is incompatible with this module.
info @swc/core-darwin-arm64@1.2.93: The CPU architecture "x64" is incompatible with this module.
info "@swc/core-darwin-arm64@1.2.93" is an optional dependency and failed compatibility check. Excluding it from installation.
info @swc/core-freebsd-x64@1.2.93: The platform "darwin" is incompatible with this module.
info "@swc/core-freebsd-x64@1.2.93" is an optional dependency and failed compatibility check. Excluding it from installation.
info @swc/core-linux-arm64-musl@1.2.93: The platform "darwin" is incompatible with this module.
info "@swc/core-linux-arm64-musl@1.2.93" is an optional dependency and failed compatibility check. Excluding it from installation.
info @swc/core-linux-arm64-musl@1.2.93: The CPU architecture "x64" is incompatible with this module.
info @swc/core-win32-arm64-msvc@1.2.93: The platform "darwin" is incompatible with this module.
info "@swc/core-win32-arm64-msvc@1.2.93" is an optional dependency and failed compatibility check. Excluding it from installation.
info @swc/core-win32-arm64-msvc@1.2.93: The CPU architecture "x64" is incompatible with this module.

Input code
yarn

Config

N/A

Expected behavior
If darwin is incompatible, don't isntall the deps/dont warn about them

Version
The version of @swc/core: 1.2.93

Additional context
Add any other context about the problem here.
I'm on macOS 11.6

@kdy1
Copy link
Member

kdy1 commented Oct 8, 2021

This is intentional.
By specifying optional dependencies, we can install the only binary package required for the platform.

@kdy1 kdy1 closed this as completed Oct 8, 2021
@pgnd
Copy link

pgnd commented Oct 17, 2021

@kdy1

dont warn about them

installing only the required bins is +1.

how's one turn off / disable the incessant warnings?

info @swc/core-linux-arm64-gnu@1.2.98: The CPU architecture "x64" is incompatible with this module.
info "@swc/core-linux-arm64-gnu@1.2.98" is an optional dependency and failed compatibility check. Excluding it from installation.
info @swc/core-win32-x64-msvc@1.2.98: The platform "linux" is incompatible with this module.
info "@swc/core-win32-x64-msvc@1.2.98" is an optional dependency and failed compatibility check. Excluding it from installation.
info @swc/core-darwin-x64@1.2.98: The platform "linux" is incompatible with this module.
info "@swc/core-darwin-x64@1.2.98" is an optional dependency and failed compatibility check. Excluding it from installation.
info @swc/core-win32-ia32-msvc@1.2.98: The platform "linux" is incompatible with this module.
info "@swc/core-win32-ia32-msvc@1.2.98" is an optional dependency and failed compatibility check. Excluding it from installation.
info @swc/core-win32-ia32-msvc@1.2.98: The CPU architecture "x64" is incompatible with this module.
info @swc/core-linux-arm-gnueabihf@1.2.98: The CPU architecture "x64" is incompatible with this module.
info "@swc/core-linux-arm-gnueabihf@1.2.98" is an optional dependency and failed compatibility check. Excluding it from installation.
info @swc/core-darwin-arm64@1.2.98: The platform "linux" is incompatible with this module.
info "@swc/core-darwin-arm64@1.2.98" is an optional dependency and failed compatibility check. Excluding it from installation.
info @swc/core-darwin-arm64@1.2.98: The CPU architecture "x64" is incompatible with this module.
info @swc/core-android-arm64@1.2.98: The platform "linux" is incompatible with this module.
info "@swc/core-android-arm64@1.2.98" is an optional dependency and failed compatibility check. Excluding it from installation.
info @swc/core-android-arm64@1.2.98: The CPU architecture "x64" is incompatible with this module.
info @swc/core-linux-arm64-musl@1.2.98: The CPU architecture "x64" is incompatible with this module.
info "@swc/core-linux-arm64-musl@1.2.98" is an optional dependency and failed compatibility check. Excluding it from installation.
info @swc/core-win32-arm64-msvc@1.2.98: The platform "linux" is incompatible with this module.
info "@swc/core-win32-arm64-msvc@1.2.98" is an optional dependency and failed compatibility check. Excluding it from installation.
info @swc/core-win32-arm64-msvc@1.2.98: The CPU architecture "x64" is incompatible with this module.

, without turning off/down logging for useful information for other modules?

these warnings serve no particularly purpose other than to create noise ...

@kdy1
Copy link
Member

kdy1 commented Oct 17, 2021

@pgnd It should be patched by npm team.

@pgnd
Copy link

pgnd commented Oct 17, 2021

@kdy1

"npm team"? Ok ... do you have a 'who' or a link for swc's npm team?

@kdy1
Copy link
Member

kdy1 commented Oct 17, 2021

No, I mean the maintainers of npm

@pgnd
Copy link

pgnd commented Oct 17, 2021

Sorry, I'm not understanding.

What's npm supposed to patch that's unique to @swc/core?

I've hundreds of npm packages installed, and only one generates this noise on every update -- @swc/core

@alexander-akait
Copy link
Contributor

@pgnd you can't disable platform warnings, it is expected, what is the problem?

@Brooooooklyn
Copy link
Member

@pgnd see evanw/esbuild#1621 for more details

@alexander-akait
Copy link
Contributor

@kdy1 I think we need open and use the same solution

@kdy1 kdy1 reopened this Oct 17, 2021
@kdy1
Copy link
Member

kdy1 commented Oct 17, 2021

@alexander-akait We are already using optionalDependencies.
Did you mean something different?

@Brooooooklyn
Copy link
Member

@alexander-akait Actually @swc/core had already using the right way which esbuild just landed to deliver the binaries cross platform

@alexander-akait
Copy link
Contributor

hm, I see... Looks like we is doing it in right way

@XiNiHa
Copy link
Contributor

XiNiHa commented Oct 17, 2021

@pgnd You may use pnpm as it has warnings about skipped deps disabled (pnpm/pnpm#3454)

@kdy1 kdy1 closed this as completed Oct 17, 2021
@swc-bot
Copy link
Collaborator

swc-bot commented Oct 21, 2022

This closed issue has been automatically locked because it had no new activity for a month. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you.

@swc-project swc-project locked as resolved and limited conversation to collaborators Oct 21, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Development

No branches or pull requests

7 participants