Error gitlab Request returned 404 Not Found on publish/version command
See original GitHub issueThe 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:
- Created 3 years ago
- Reactions:6
- Comments:7
Top GitHub Comments
I have the same error:
But if I do the normal
npm publish
, it works.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