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

yarn create fails with scoped packages in 1.9.4 #6266

Closed
fenduru opened this issue Aug 13, 2018 · 2 comments · Fixed by #6271 or GulajavaMinistudio/yarn#234
Closed

yarn create fails with scoped packages in 1.9.4 #6266

fenduru opened this issue Aug 13, 2018 · 2 comments · Fixed by #6271 or GulajavaMinistudio/yarn#234
Labels

Comments

@fenduru
Copy link
Contributor

fenduru commented Aug 13, 2018

Do you want to request a feature or report a bug?

Bug

What is the current behavior?

If the current behavior is a bug, please provide the steps to reproduce.

$ yarn create @scope/foo
yarn create v1.9.4
[1/4] Resolving packages...
[2/4] Fetching packages...
[3/4] Linking dependencies...
[4/4] Building fresh packages...

success Installed "@scope/[email protected]" with binaries:
      - create-foo
[##################################################################################################################################################################################################################-] 784/786The system cannot find the path specified.
error Command failed.
Exit code: 1
Command: C:\Users\me\AppData\Local\Yarn\bin\@scope\create-foo
Arguments:
Directory: C:\Users\me\Documents\dev\create-foo-test
Output:

info Visit https://yarnpkg.com/en/docs/cli/create for documentation about this command.

What is the expected behavior?

The binary is being installed to AppData\Local\Yarn\bin\create-foo however yarn create is trying to execute a file with the @scope in the path. This is a regression from 1.7.0 where this worked properly.

Please mention your node.js, yarn and operating system version.

Node 8.9.4, Yarn 1.9.4, Windows 7

Possibly related to #6174

@ghost ghost added the triaged label Aug 13, 2018
@jlortega
Copy link

$ yarn create @scope/foo
yarn create v1.9.2
[1/4] 🔍 Resolving packages...
error An unexpected error occurred: "https://registry.yarnpkg.com/@scope%2fcreate-foo: Not found".
info If you think this is a bug, please open a bug report with the information provided in "/Users/usr/.config/yarn/global/yarn-error.log".
info Visit https://yarnpkg.com/en/docs/cli/create for documentation about this command.

Node 10.7.0
Yarn 1.9.2
macOS High Sierra

@gordlea
Copy link

gordlea commented Aug 14, 2018

Same issue here:

Yarn 1.9.4
macOS High Sierra

yarn create @somescope/js-project new-test-app
yarn create v1.9.4
[1/4] 🔍  Resolving packages...
[2/4] 🚚  Fetching packages...
[3/4] 🔗  Linking dependencies...
[4/4] 📃  Building fresh packages...
success Installed "@somescope/[email protected]" with binaries:
      - create-js-project
/bin/sh: /Users/gordlea/.yarn/bin/@somescope/create-js-project: No such file or directory
error Command failed.
Exit code: 127
Command: /Users/gordlea/.yarn/bin/@somescope/create-js-project
Arguments: new-test-app
Directory: /Users/gordlea/dev/microapps
Output:

info Visit https://yarnpkg.com/en/docs/cli/create for documentation about this command.

fenduru added a commit to fenduru/yarn that referenced this issue Aug 14, 2018
When running yarn create, first the package is installed globally,
however after installing create was attempting to invoke the binary from
within a scope folder that did not exists. The corrects the path
resolution to invoke the binary from the actual place it was installed
to.

fixes yarnpkg#6266
arcanis pushed a commit that referenced this issue Aug 16, 2018
* fix(create): invoke correct path when using scoped package

When running yarn create, first the package is installed globally,
however after installing create was attempting to invoke the binary from
within a scope folder that did not exists. The corrects the path
resolution to invoke the binary from the actual place it was installed
to.

fixes #6266

* Update create.js
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
3 participants