[Bug?]: The remote server failed to provide the requested resource

See original GitHub issue

Self-service

  • I’d be willing to implement a fix

Describe the bug

Given a yarn workspace with packages, one of which is an app with its own git repo, I’ve migrated from classic to 3.2.3 and since that, yarn fails with

➤ YN0035: │ @myscope/some-workspace-module@npm:^1.1.2: The remote server failed to provide the requested resource
➤ YN0035: │   Response Code: 404 (Not Found)
➤ YN0035: │   Request Method: GET
➤ YN0035: │   Request URL: https://registry.yarnpkg.com/@myscope%2fsome-workspace-module
➤ YN0000: └ Completed in 4s 999ms
➤ YN0000: Failed with errors in 5s 2ms

The 404 is obvious as this is a workspace-only module not published to npm. Why is it not looking in the workspace? yarn has been executed inside the workspace base folder and I can see the symlink

node_modules/@myscope/some-workspace-module -> ../../packages/some-workspace-module

To reproduce

I’m trying to see if this has a straightforward answer, if not I will try to create a repro.

Environment

System:
    OS: macOS 12.6
  Binaries:
    Node: 16.17.0 - /private/var/folders/ht/18wcb1f538bgx47qrfc1n0q80000gq/T/xfs-3bf67840/node
    Yarn: 3.2.3 - /private/var/folders/ht/18wcb1f538bgx47qrfc1n0q80000gq/T/xfs-3bf67840/yarn
    npm: 8.15.0 - ~/.volta/tools/image/node/16.17.0/bin/npm

Additional context

Workspace visualization:

Workspace (git repo)
   | packages
   |   | some-workspace-module (package.json name: "@myscope/some-workspace-module", version: "1.1.2", private: true)
   |   | app (git repo) <- package.json dependency "@myscope/some-workspace-module": "^1.1.2", yarn inside this directory fails
   | node_modules
   |   | @myscope
   |   |   |  some-workspace-module -> ../../packages/some-workspace-module

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:8 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
RDILcommented, Sep 30, 2022

In the actual workspace’s package.json, add the version field.

0reactions
bebbicommented, Oct 6, 2022

In case it helps others, I had an unused version field (was a workspace but not a controlled monorepo) and it kept it from working. Removing the version field got it to work again.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Installing private package from Github Package registry using ...
I do have access to the scope and package on Github. and again my first setup works just fine with npm. But I...
Read more >
Connecting to the remote server failed when start ...
Connecting to remote server failed with the following error message: The WinRM client sent a request to an HTTP server and got a...
Read more >
Yarn publish does not work (#121668) · Issues - GitLab
When attempting to use yarn publish with an .npmrc configured by following our documentation, yarn fails with the following error:.
Read more >
Why am I getting 404 for some npm packages? - JFrog
However, when working with the npm public registry, HEAD requests will sometimes trigger a 404 error response even though the requested package exists....
Read more >
Error Codes | Yarn - Package Manager
The remote source returned valid data, but told us the package couldn't be found. This error is thrown by the resolvers and fetchers...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found