I'm trying to publish a package to Gitlab package registry but it keeps erroring me with 404 #my-scope/<package-name> is not in this registry.
Initially I followed the instructions in here official docs
This is how my .npmrc looks like:
#my-scope:registry=https://gitlab.com/api/v4/projects/<project_id>/packages/npm/
//gitlab.com/api/v4/projects/<project_id>/packages/npm/:_authToken=${TOKEN}
also I've added publishConfig to package.json
"publishConfig": {
"#my-scope:registry": "https://gitlab.com/api/v4/projects/<project_id>/packages/npm/"
},
When I run npm publish I keep getting 404 error as below.
npm notice Publishing to https://gitlab.com/api/v4/projects/<project_id>/packages/npm/
npm ERR! code E404
npm ERR! 404 Not Found - PUT https://gitlab.com/api/v4/projects/<project_id>/packages/npm/#my-scope%2fpackage-name
npm ERR! 404
npm ERR! 404 '#my-scope/package-name#1.5.0' is not in this registry.
npm ERR! 404 You should bug the author to publish it (or use the name yourself!)
npm ERR! 404
npm ERR! 404 Note that you can also install from a
Your .npmrc should looks like this according to the docs:
#foo:registry=https://gitlab.example.com/api/v4/packages/npm/
//gitlab.example.com/api/v4/packages/npm/:_authToken=${MY_TOKEN}
//gitlab.example.com/api/v4/projects/<your_project_id>/packages/npm/:_authToken=${MY_TOKEN}
Related
my .npmrc
#bytap:registry=https://gitlab.com/api/v4/packages/npm/
'//gitlab.com/api/v4/packages/npm/:_authToken'="${GITLAB_AUTH_TOKEN}"
'//gitlab.com/api/v4/projects/37004905/packages/npm/:_authToken'="${GITLAB_AUTH_TOKEN}"
my package.json
"name": "#bytap/reuicom",
"publishConfig": {
"#bytap/registry": "https://gitlab.com/api/v4/projects/37004905/packages/npm/"
},
gitlab created group called as bytap and has project in it i.e. reuicom
running GITLAB_AUTH_TOKEN=<Gitlab Deploy token> npm publish --verbose getting this error
npm verb stack HttpErrorGeneral: 404 Not Found - PUT https://gitlab.com/api/v4/packages/npm/#bytap%2freuicom - 404 Not Found
npm ERR! code E404
npm ERR! 404 Not Found - PUT https://gitlab.com/api/v4/packages/npm/#bytap%2freuicom - 404 Not Found
npm ERR! 404
npm ERR! 404 '#bytap/reuicom#0.1.0' is not in this registry.
npm ERR! 404 You should bug the author to publish it (or use the name yourself!)
npm ERR! 404
npm ERR! 404 Note that you can also install from a
npm ERR! 404 tarball, folder, http url, or git url.
You need to have registered "supericium" (npm adduser) as a username at the registry and be logged in (npm login) to publish under that scope.
https://docs.npmjs.com/getting-started/publishing-npm-packages
or
https://docs.npmjs.com/getting-started/scoped-packages
In my case, I had an .npmrc file in the project which was overriding my user profile .npmrc settings. You can run npm config list to check the config values in effect and figure out anything goes wrong there or not.
I'm trying to upload an npm package to a GitLab registry for the first time. I set the scope and the npm config entries according to the documentation, but when I execute npm publish, I get the following error:
npm notice Publishing to https://git.myorg.com/api/v4/projects/123/packages/npm/
npm ERR! code E404
npm ERR! 404 Not Found - PUT https://git.myorg.com/api/v4/projects/123/packages/npm/#myscope%2fmyproject
npm ERR! 404
npm ERR! 404 '#myscope/myproject#1.0.0' is not in this registry.
npm ERR! 404 You should bug the author to publish it (or use the name yourself!)
npm ERR! 404
npm ERR! 404 Note that you can also install from a
npm ERR! 404 tarball, folder, http url, or git url.
So I try to publish it, and the error says it doesn't exist and that I should publish it...what?!
From the last two lines it looks like the error is meant for an installation failure, but I have definitely used npm publish. Also, in the PUT command, the final slash between scope and project name is replaced with %2f. No idea why that happened and why it happened nowhere else, but maybe that is a symptom of the underlying issue?
Ok, it was my own fault. When executing npm config set #foo:registry https://gitlab.example.com/api/v4/projects/<your_project_id>/packages/npm/, I put in the group ID instead of the project ID in the place of <your_project_id>. We use the group only for the package registry project, so I got them confused.
Node version: 10.16.0
Sails version (sails): 1.2.3
When I try to create new project using sails cli it just gives me below error and I can not do anything.
And I see there is a package https://www.npmjs.com/package/socket.io-redis but it doesn't have #sailshq prefix in the package name.
npm ERR! code E404
npm ERR! 404 Not Found - GET https://registry.npmjs.org/#sailshq%2fsocket.io-redis - Not Found
npm ERR! 404
npm ERR! 404 '#sailshq/socket.io-redis#latest' is not in the npm registry.
npm ERR! 404 You should bug the author to publish it (or use the name yourself!)
npm ERR! 404
npm ERR! 404 Note that you can also install from a
npm ERR! 404 tarball, folder, http url, or git url.
Can someone help me please?
Thanks
Maybe you should use npm i #sailshq/socket.io-redis?
https://www.npmjs.com/package/#sailshq/socket.io-redis
I am trying to install protractor but receiving following error.
command:
npm install -g protractor
npm ERR! node v4.4.3
npm ERR! npm v2.15.1
npm ERR! code E404
npm ERR! 404 no such package available : #types/jasmine
npm ERR! 404
npm ERR! 404 '#types/jasmine' is not in the npm registry.
npm ERR! 404 You should bug the author to publish it (or use the name yourself!)
npm ERR! 404 It was specified as a dependency of 'protractor'
npm ERR! 404
npm ERR! 404 Note that you can also install from a
npm ERR! 404 tarball, folder, http url, or git url.
npm ERR! Please include the following file with any support request:
npm ERR! F:\temp\chrome downloads\npm-debug.log
I came across this issue today and my problem was that I had set a custom registry within the npm config file. Have you ever used "npm set registry"?
If so, you can manually tell npm where to look for the '#types' registry with the following command:
npm config set #types:registry https://registry.npmjs.org/
The problem is coming from the fact that you're using a private registry that has not yet added support for #organization packages.
In my case, I was using Sonatype Nexus and my version didn't have support for those types of packages. #Willie Valdez's suggestion is probably the best solution for you, right now.
Also, check if you have a .npmrc file in your home directory or in your project directory. The registry might be there. If that's the case, just rename the file to npmrc_bak or something else until you install the package and then revert back to its original name.
You can also include a .npmrc file in your current project with the below details:
#angular:registry=https://registry.npmjs.org
#types:registry=https://registry.npmjs.org
#ngtools:registry=https://registry.npmjs.org
#angular-cli:registry=https://registry.npmjs.org
its handy and resuable across new projects.
I downloaded my IBM bluemix nodeJS app, and trying to install all the dependencies of the project. For some reason, ibmconfig is throwing an exception. However, the URL works fine from the browser. Looks like a npm registry exception.This module is a dependency for ibmsecurity.
Here is the package.json dependency content:
"dependencies": {
"express": "4.*",
"body-parser": "*",
"ibmsecurity": "*",
"twilio": "*",
"ibmbluemix":"*",
"ibmdata":"*"
}
Here is the 404 exception:
npm WARN package.json # license should be a valid SPDX license expression
npm ERR! Darwin 14.4.0
npm ERR! argv "node" "/usr/local/bin/npm" "install" "ibmconfig"
npm ERR! node v0.12.7
npm ERR! npm v2.11.3
npm ERR! code E404
npm ERR! 404 Registry returned 404 for GET on https://registry.npmjs.org/ibmconfig
npm ERR! 404
npm ERR! 404 'ibmconfig' is not in the npm registry.
npm ERR! 404 You should bug the author to publish it (or use the name yourself!)
npm ERR! 404
npm ERR! 404 Note that you can also install from a
npm ERR! 404 tarball, folder, http url, or git url.
npm ERR! Please include the following file with any support request:
Thanks for your help
Although that registry file still exists, if you go to the ibmconfig package page you'll see that it does not exist. I suspect that the package has been unpublished. You may have to contact the original maintainer to find out what happened.
Review of the ibmsecurity npm package's Git log for the package.json file, it looks like the dependency on an ibmconfig package was removed on 2015-07-29. You may need to update the package with npm update ibmsecurity
You will only see this error if you use the beta version of ibmsecurity (0.3.x). Change your dependency to use "latest" or "1.0.x" and you will not have this problem.