NPM Package Registry Returns 404 with upstream package-lock.json #9725

Open
opened 2025-11-02 08:47:44 -06:00 by GiteaMirror · 0 comments
Owner

Originally created by @Racer159 on GitHub (Oct 23, 2022).

Description

The NPM package registry adds a /version in the URL that it uses to pull down the package tarball from the remote, and while this works when a repository has been configured to use Gitea alone, migrating projects back and forth from another registry (i.e. https://registry.npmjs.org/) requires you to delete (or otherwise update) the package-lock.json file for npm to resolve the package correctly.

Gitea Version

dcd9fc7ee8

Can you reproduce the bug on the Gitea demo site?

Yes

Log Gist

https://gist.github.com/Racer159/1f6a7d5ea64e76d0acc44c0b23606a3a

Screenshots

image

Git Version

2.38.0

Operating System

popOS 22.04

How are you running Gitea?

For this testing I was running it locally from a fresh copy built from main. Normally, however this server is ran inside of Kubernetes with the official Gitea chart (specifically https://dl.gitea.io/charts version: 6.0.1).

Database

SQLite

Originally created by @Racer159 on GitHub (Oct 23, 2022). ### Description The NPM package registry adds a `/version` in the URL that it uses to pull down the package tarball from the remote, and while this works when a repository has been configured to use Gitea alone, migrating projects back and forth from another registry (i.e. https://registry.npmjs.org/) requires you to delete (or otherwise update) the package-lock.json file for npm to resolve the package correctly. ### Gitea Version dcd9fc7ee894700f702f3847d7d2a41d6a009b7e ### Can you reproduce the bug on the Gitea demo site? Yes ### Log Gist https://gist.github.com/Racer159/1f6a7d5ea64e76d0acc44c0b23606a3a ### Screenshots ![image](https://user-images.githubusercontent.com/3977569/197404920-a6af5e33-9f0b-4952-ba3e-61c49c655373.png) ### Git Version 2.38.0 ### Operating System popOS 22.04 ### How are you running Gitea? For this testing I was running it locally from a fresh copy built from `main`. Normally, however this server is ran inside of Kubernetes with the official Gitea chart (specifically https://dl.gitea.io/charts version: 6.0.1). ### Database SQLite
GiteaMirror added the topic/packagestype/bug labels 2025-11-02 08:47:44 -06:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#9725