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

[Bug?]: Yarn3.1.1 cannot run zx@5.0.0 #4120

Closed
1 task
chenyulun opened this issue Feb 16, 2022 · 2 comments
Closed
1 task

[Bug?]: Yarn3.1.1 cannot run zx@5.0.0 #4120

chenyulun opened this issue Feb 16, 2022 · 2 comments
Labels
bug Something isn't working

Comments

@chenyulun
Copy link

Self-service

  • I'd be willing to implement a fix

Describe the bug

➜  testyarn3 git:(master) ✗ node -v
v16.14.0
➜  testyarn3 git:(master) ✗ yarn -v
3.1.1
➜  testyarn3 git:(master) ✗ corepack enable
➜  testyarn3 git:(master) ✗ yarn zx -v
(node:51581) ExperimentalWarning: --experimental-loader is an experimental feature. This feature could change at any time
(Use `node --trace-warnings ...` to show where the warning was created)
/Users/chenyulun390/learn/testyarn3/.pnp.cjs:9971
  return Object.defineProperties(new Error(message), {
                                 ^

Error: chalk tried to access #ansi-styles, but it isn't declared in its dependencies; this makes the require call ambiguous and unsound.

Required package: #ansi-styles (via "#ansi-styles/package.json")
Required by: chalk@npm:5.0.0 (via /Users/chenyulun390/learn/testyarn3/.yarn/cache/chalk-npm-5.0.0-7be183234e-6eba7c518b.zip/node_modules/chalk/source/index.js)

    at internalTools_makeError (/Users/chenyulun390/learn/testyarn3/.pnp.cjs:9971:34)
    at resolveToUnqualified (/Users/chenyulun390/learn/testyarn3/.pnp.cjs:11269:21)
    at Object.resolveToUnqualified (/Users/chenyulun390/learn/testyarn3/.pnp.cjs:11466:26)
    at resolve$1 (file:///Users/chenyulun390/learn/testyarn3/.pnp.loader.mjs:195:31)
    at ESMLoader.resolve (node:internal/modules/esm/loader:530:30)
    at ESMLoader.getModuleJob (node:internal/modules/esm/loader:251:18)
    at ModuleWrap.<anonymous> (node:internal/modules/esm/module_job:79:40)
    at link (node:internal/modules/esm/module_job:78:36)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
➜  testyarn3 git:(master) ✗

To reproduce

  1. install node16.14.0
  2. corepack enable
  3. yarn init -2
  4. yarn add zx -D
  5. yarn zx -v

Environment

System:
    OS: macOS 11.3.1
    CPU: (8) x64 Intel(R) Core(TM) i7-1068NG7 CPU @ 2.30GHz
  Binaries:
    Node: 16.14.0 - /private/var/folders/hm/1sn5vn75613gjp0mj2zbx75h2h76mq/T/xfs-9f3823fb/node
    Yarn: 3.1.1 - /private/var/folders/hm/1sn5vn75613gjp0mj2zbx75h2h76mq/T/xfs-9f3823fb/yarn
    npm: 8.3.1 - ~/.nvm/versions/node/v16.14.0/bin/npm

Additional context

No response

@chenyulun chenyulun added the bug Something isn't working label Feb 16, 2022
@chenyulun
Copy link
Author

.yarn/cache/node_modules/chalk/source/index.js

import ansiStyles from '#ansi-styles';
import supportsColor from '#supports-color';
import { // eslint-disable-line import/order
	stringReplaceAll,
	stringEncaseCRLFWithFirstIndex,
} from './utilities.js';

@merceyz
Copy link
Member

merceyz commented Feb 16, 2022

Duplicate of #3843

@merceyz merceyz marked this as a duplicate of #3843 Feb 16, 2022
@merceyz merceyz closed this as completed Feb 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants