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

Contacts registry for workspace package when dependency version is "*" #6079

Open
kasbah opened this issue Jul 9, 2018 · 2 comments
Open
Assignees
Labels

Comments

@kasbah
Copy link

kasbah commented Jul 9, 2018

What is the current behavior?

When I set a dependency of an internal workspace package to any version (an asterisk i.e. "*") yarn tries to find it on the registry and fails.

I have in the root package.json:

"workspaces" : [
    ...
    "packages/urql",
    "services/frontend",
    ...

in packages/urql/package.json I have:

{
  "name": "@kitspace/urql",
  "version": "0.3.0-next1",
  ...

and in services/frontend/package.json I have:

  "dependencies": {
    "@kitspace/after": "*",
    "@kitspace/razzle": "*",
    "@kitspace/urql": "*",
    "create-react-class": "^15.6.3",
    ...

The error with verbose on:

yarn install v1.8.0
verbose 0.428 Checking for configuration file "/tmp/kitspace/.npmrc".
verbose 0.428 Checking for configuration file "/home/kaspar/.npmrc".
verbose 0.428 Checking for configuration file "/home/kaspar/.nvm/versions/node/v8.9.4/etc/npmrc".
verbose 0.429 Checking for configuration file "/tmp/kitspace/.npmrc".
verbose 0.429 Checking for configuration file "/tmp/.npmrc".
verbose 0.43 Checking for configuration file "/tmp/kitspace/.yarnrc".
verbose 0.43 Checking for configuration file "/home/kaspar/.yarnrc".
verbose 0.43 Checking for configuration file "/home/kaspar/.nvm/versions/node/v8.9.4/etc/yarnrc".
verbose 0.43 Checking for configuration file "/tmp/kitspace/.yarnrc".
verbose 0.43 Checking for configuration file "/tmp/.yarnrc".
verbose 0.432 current time: 2018-07-09T23:48:06.310Z
verbose 0.575 Performing "GET" request to "https://yarnpkg.com/latest-version".
[1/4] Resolving packages...
verbose 0.75 Performing "GET" request to "https://registry.yarnpkg.com/@kitspace%2furql".
verbose 2.172 Request "https://yarnpkg.com/latest-version" finished with status code 200.
verbose 3.102 Request "https://registry.yarnpkg.com/@kitspace%2furql" finished with status code 404.
verbose 3.107 Error: Couldn't find package "@kitspace/urql@*" required by "@kitspace/frontend@0.0.0" on the "npm" registry.
    at MessageError.ExtendableBuiltin (/usr/share/yarn/lib/cli.js:243:66)
    at new MessageError (/usr/share/yarn/lib/cli.js:272:123)
    at PackageRequest.<anonymous> (/usr/share/yarn/lib/cli.js:36369:17)
    at Generator.throw (<anonymous>)
    at step (/usr/share/yarn/lib/cli.js:98:30)
    at /usr/share/yarn/lib/cli.js:111:13
    at <anonymous>
    at process._tickCallback (internal/process/next_tick.js:188:7)
error Couldn't find package "@kitspace/urql@*" required by "@kitspace/frontend@0.0.0" on the "npm" registry.
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.

If I change the dependency of this package to the specific version 0.3.0-next1 then it links it in fine. The other packages seem to link in fine with a * version.

Steps to reproduce.

git clone --depth=1 https://github.com/monostable/kitspace --branch=yarn-workspaces-reprod
cd kitspace
yarn

What is the expected behavior?

Yarn workspaces does its awesome thing and links in the packages/urql dependency properly.

Please mention your node.js, yarn and operating system version.
Node; v8.9.4/v9.4.0
Yarn: 1.7.0/1.8.0 pre-release
Ubuntu 16.04

@ghost ghost assigned imsnif Jul 9, 2018
@ghost ghost added the triaged label Jul 9, 2018
@vlinder
Copy link

vlinder commented May 27, 2022

I have the same issue on yarn 1.22.18. It appears to be related to the -next1 thingy on the dependencies version. * does not seem to match that part for some reason. If I remove whatever is set there it successfully installs. Npm has no issue installing it as is.

@kasbah
Copy link
Author

kasbah commented May 27, 2022

Can confirm I can still reproduce this with steps from above with yarn 1.22.19.

AntoLC added a commit to openfun/marsha that referenced this issue Mar 31, 2023
To pin our packages with * seems to create issues with yarn.
It could be because of the keyword "-beta":
@see yarnpkg/yarn#6079
AntoLC added a commit to openfun/marsha that referenced this issue Apr 3, 2023
To pin our packages with * seems to create issues with yarn.
It could be because of the keyword "-beta":
@see yarnpkg/yarn#6079
AntoLC added a commit to openfun/marsha that referenced this issue Apr 3, 2023
To pin our packages with * seems to create issues with yarn.
It could be because of the keyword "-beta":
@see yarnpkg/yarn#6079
AntoLC added a commit to openfun/marsha that referenced this issue Apr 3, 2023
To pin our packages with * seems to create issues with yarn.
It could be because of the keyword "-beta":
@see yarnpkg/yarn#6079
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants