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

failed to install yarn.build plugin #74

Closed
dongyuwei opened this issue Feb 9, 2021 · 3 comments
Closed

failed to install yarn.build plugin #74

dongyuwei opened this issue Feb 9, 2021 · 3 comments
Assignees
Labels
bug Something isn't working

Comments

@dongyuwei
Copy link

dongyuwei commented Feb 9, 2021

Describe the bug
A clear and concise description of what the bug is.

To Reproduce
Steps to reproduce the behavior:

  1. npm install -g yarn@berry
  2. yarn plugin import https://yarn.build/latest
  3. See error

Expected behavior
Okay to install yarn.build plugin

Screenshots

yarn plugin import https://yarn.build/latest
➤ YN0001: ReferenceError: name is not defined
    at /usr/local/lib/node_modules/yarn/bin/yarn.js:58:32838
    at async Function.start (/usr/local/lib/node_modules/yarn/bin/yarn.js:24:44856)
    at async u.execute (/usr/local/lib/node_modules/yarn/bin/yarn.js:58:32187)
    at async u.validateAndExecute (/usr/local/lib/node_modules/yarn/bin/yarn.js:24:40434)
    at async c.run (/usr/local/lib/node_modules/yarn/bin/yarn.js:36:533800)
    at async c.runExit (/usr/local/lib/node_modules/yarn/bin/yarn.js:36:533934)
➤ YN0000: Failed with errors in 0.12s

 yarn -v
2.0.0-rc.27

image

Desktop:

  • OS: macOS and Windows
@dongyuwei dongyuwei added the bug Something isn't working label Feb 9, 2021
@ojkelly ojkelly self-assigned this Feb 11, 2021
@emilio-martinez
Copy link

@dongyuwei this may be related to you installing yarn berry as a global. As you'll see from the installation instructions, the yarn you install globally is v1, while v2 is installed locally.

@ojkelly
Copy link
Owner

ojkelly commented Mar 14, 2021

that's a good point @emilio-martinez with both yarn berry and yarn build they are intended to be bundled into your repository (in the .yarn folder).

Yarn build is not something you can install globally.

Can you try installing it again but without installing globally and see if it works?

@ojkelly
Copy link
Owner

ojkelly commented Jul 11, 2021

I'm going to close this issue, but feel free to re-open or comment if you are still having trouble or have more information.

@ojkelly ojkelly closed this as completed Jul 11, 2021
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

3 participants