question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Error gitlab Request returned 404 Not Found on publish/version command

See original GitHub issue

The gitlab release task returns error gitlab Request returned 404 Not Found on publish/version command.

The repository url is in non standard form: https://domain/extra_path/repo_group/repo_name.git

The launched command is GL_TOKEN=token GL_API_URL=https://domain/extra_path/api/v4 lerna publish

The log of command

45 silly parseGitRepo
46 verbose git [ 'config', '--get', 'remote.origin.url' ]
47 silly Creating a GitLab client...
48 silly Requesting GitLab releases https://domain/extra_path/api/v4/projects/extra_path%2Frepo_group%2Frepo_name/releases
49 error gitlab Failed to create release
49 error gitlab Request returned 404 Not Found

Line 48 of the log shows how lerna build the url of the gitlab request: the url built is incorrect.

Expected Behavior

I expect the release to be created in my gitlab repository successfully with the right url of the gitlab request: https://domain/extra_path/api/v4/projects/repo_group%2Frepo_name/releases

Current Behavior

The relese on gitlab is not created and the url built by lerna for the request is https://domain/extra_path/api/v4/projects/extra_path%2Frepo_group%2Frepo_name/releases

Possible Solution

The problem could be solved by adding a parameter in configuration that allows you to specify the id of the gittlab project

lerna.json

{
  "packages": ["projects/eng-ds/*"],
  "version": "independent",
  "command": {
    "publish": {
      "conventionalCommits": true,
      "createRelease": "gitlab"
    }
  }
}

lerna-debug.log

45 silly parseGitRepo
46 verbose git [ 'config', '--get', 'remote.origin.url' ]
47 silly Creating a GitLab client...
48 silly Requesting GitLab releases https://domain/extra_path/api/v4/projects/extra_path%2Frepo_group%2Frepo_name/releases
49 error gitlab Failed to create release
49 error gitlab Request returned 404 Not Found

Context

The error appears when trying to create a release on gitlab when the repository url does not meet the standard

Environment

Executable Version
lerna --version 3.20.2
npm --version 6.14.3
node --version 12.13.0
OS Version
Linux Mint Tricia 19.3

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:6
  • Comments:7

github_iconTop GitHub Comments

1reaction
sandrina-pcommented, Oct 15, 2020

I have the same error:

lerna http fetch PUT 404 https://gitlab.com/api/v4/packages/npm/@awesome-package%2fcore 303ms
lerna ERR! E404 404 Not Found

But if I do the normal npm publish, it works.

0reactions
github-actions[bot]commented, Jun 17, 2022

Hi Folks 👋

You will have seen in our message above that we at Nrwl are working really hard to bring the lerna repo up to date with what matters most to its community in June 2022.

As previously stated in that message, because we have not heard from the original author of this issue within the last 14 days, we are now automatically closing it.

If any users, including the original author, are still impacted by this issue then we still want to hear from you!

All we ask is that you first update to the latest lerna (5.1.4 at the time of writing) to make sure it is still reproducible, and then fill out one of our new issue templates, providing all the requested details which apply to your situation:

https://github.com/lerna/lerna/issues/new/choose

Many thanks again! 🙏


P.S. Over and above getting to grips with the repo, we have also been hard at work launching a new website, resolving all vulnerabilities, merging exciting new features and reigniting community PR contributions! 🚀

You can read our recent blog post to learn more about what we’ve been up to: https://blog.nrwl.io/lerna-5-1-new-website-new-guides-new-lerna-example-repo-distributed-caching-support-and-speed-64d66410bec7

Read more comments on GitHub >

github_iconTop Results From Across the Web

Publish composer registry returned 404 not found in ... - GitLab
@trizzi I just tried to publish composer package on gitlab.com and success, but with the same steps I still got 404 error on...
Read more >
Troubleshoot deployment issues in Lambda
This issue can occur when you specify an Amazon S3 object in a call to UpdateFunctionCode, or use the package and deploy commands...
Read more >
Basics of SwaggerHub - SmartBear Support
To search for existing APIs on SwaggerHub, use the search page that ... describe various error codes that can be returned by an...
Read more >
pact-python
hey guys, pact-verifier returns exit code 0 even when the verification fails, ... I believe the docs on the Github page could be...
Read more >
MLRun - Release UNKNOWN Iguazio
This page explains how MLRun addresses the MLOps tasks and presents ... Data preparation, model development, model and application delivery ...
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