Closed
Description
Is there an existing issue for this?
- I have searched the existing issues
This issue exists in the latest npm version
- I am using the latest npm
Current Behavior
I have the following in ~/.npmrc
:
@Organization:registry=https://npm.pkg.github.com/
//registry.npmjs.org/:_authToken=npm_<token>
registry=https://registry.npmjs.org/
//npm.pkg.github.com/:_authToken=<github_token>
init-author-name=First Name, Last
and the following package.json:
{
"name": "@Organization/application",
"version": "1.0.0",
"license": "UNLICENSED",
"scripts": {
"clean": "rimraf dist",
"build": "npm run clean && tsc && cp package.json dist",
"deploy": "npm publish @Organization/application@$npm_package_version",
"test": "echo 'no tests'"
}
and when I run npm deploy
, I see the following error:
npm ERR! code E404
npm ERR! 404 Not Found - GET https://npm.pkg.github.com/@Organization%2fapplication - npm package "application" does not exist under owner "Organization"
npm ERR! 404
npm ERR! 404 '@Organization/gvs-kit@1.0.0' is not in this registry.
npm ERR! 404 This package name is not valid, because
npm ERR! 404 1. name can no longer contain capital letters
npm ERR! 404
npm ERR! 404 Note that you can also install from a
npm ERR! 404 tarball, folder, http url, or git url.
When I use publish
instead in package.json
:
{
"name": "@Organization/application",
"version": "1.0.0",
"license": "UNLICENSED",
"scripts": {
"clean": "rimraf dist",
"build": "npm run clean && tsc && cp package.json dist",
"publish": "npm publish @Organization/application@$npm_package_version",
"test": "echo 'no tests'"
}
I get the following error:
npm notice Publishing to https://npm.pkg.github.com/ with tag latest and default access
npm ERR! code EPUBLISHCONFLICT
npm ERR! publish fail Cannot publish over existing version.
npm ERR! publish fail Update the 'version' field in package.json and try again.
npm ERR! publish fail
npm ERR! publish fail To automatically increment version numbers, see:
npm ERR! publish fail npm help version
And I can see it creates / publish the package to the private organization github repo. However, I have not verified the content is valid.
Expected Behavior
No response
Steps To Reproduce
- In this environment...
- With this config...
- Run '...'
- See error...
Environment
- npm: 9.2.0
- Node.js: v18.8.0
- OS Name: Ubuntu 22.10
- System Model Name:
- npm config:
; "user" config from /home/khteh/.npmrc
@Kyberlife:registry = "https://npm.pkg.github.com/"
//npm.pkg.github.com/:_authToken = (protected)
//registry.npmjs.org/:_authToken = (protected)
init-author-name = "Kok How, Teh"
registry = "https://registry.npmjs.org/"
; "cli" config from command line options
location = "project"
; node bin location = /usr/local/bin/node
; node version = v18.8.0
; npm local prefix = /usr/src/kyberlife/gvs-kit
; npm version = 9.2.0
; cwd = /usr/src/kyberlife/gvs-kit
; HOME = /home/khteh
; Run `npm config ls -l` to show all defaults.