Closed nirmalrizal closed 7 years ago
When you read the npm help dist-tag
you see npm dist-tag add <pkg>@<version> [<tag>]
The []
around
npm dist-tag add npm-codecamp@1.0.1 npm-nodecamp
I also tried adding via the following command and got the same error as the original poster. Using sudo as I haven't fixed the permission problem with npm.
sudo npm dist-tag add how-to-npm-tutorial@1.0.1 how-to-npm-tutorial
When using just "npm dist-tag add how-to-tutorial-npm@1.0.1 how-to-npm-tutorial", it gives me a message about just Usage: npm
What am I missing?
Just read https://github.com/sindresorhus/guides/blob/master/npm-global-without-sudo.md if you have a global Node otherwise, just use NVM using this recipe
npm dist-tag add easy_test@0.0.3 test_for_tag
npm ERR! 404 missing : -/package/easy_test/dist-tags
npm ERR! Please include the following file with any support request: npm ERR! /Users/wdy/Documents/npmtest/npm-debug.log
the below is the content of npm-debug.log:
0 info it worked if it ends with ok
1 verbose cli [ '/usr/local/Cellar/node/6.1.0/bin/node',
1 verbose cli '/usr/local/bin/npm',
1 verbose cli 'dist-tag',
1 verbose cli 'add',
1 verbose cli 'easy_test@0.0.3',
1 verbose cli 'test_for_tag' ]
2 info using npm@3.8.6
3 info using node@v6.1.0
4 verbose dist-tag add test_for_tag to easy_test@0.0.3
5 silly mapToRegistry name easy_test
6 silly mapToRegistry using default registry
7 silly mapToRegistry registry http://localhost:15443/
8 silly mapToRegistry data Result {
8 silly mapToRegistry raw: 'easy_test',
8 silly mapToRegistry scope: null,
8 silly mapToRegistry name: 'easy_test',
8 silly mapToRegistry rawSpec: '',
8 silly mapToRegistry spec: 'latest',
8 silly mapToRegistry type: 'tag' }
9 silly mapToRegistry uri http://localhost:15443/easy_test
10 verbose request uri http://localhost:15443/-/package/easy_test/dist-tags
11 verbose request no auth needed
12 info attempt registry request try #1 at 9:46:25 PM
13 verbose request id 3d0d0fb0622bc8bf
14 http request GET http://localhost:15443/-/package/easy_test/dist-tags
15 http 404 http://localhost:15443/-/package/easy_test/dist-tags
16 verbose headers { 'content-type': 'application/json',
16 verbose headers date: 'Sat, 08 Oct 2016 13:46:25 GMT',
16 verbose headers connection: 'keep-alive',
16 verbose headers 'content-length': '19' }
17 verbose stack Error: missing : -/package/easy_test/dist-tags
17 verbose stack at makeError (/usr/local/lib/node_modules/npm/node_modules/npm-registry-client/lib/request.js:264:12)
17 verbose stack at CachingRegistryClient.
could you give some advice? I have tried all the methods,including the above two
Hello everyone,
I see this issue is still open, I manage to pass the two dist-tag exercises.
So first you want to got to your package.json file, then copy the name value (the name of module). For example:
{
"name": "@user/nameOfModule",
"version": "1.0.1",
"main": "index.js",
"scripts": {
"test": "node test.js"
},
copy the line called name (it won't be same and only the value! without "name": )
After you copied the correct name to add the the tag too, use this command:
npm dist-tag add <copied named from package.json>@1.0.1 beta
For the second exercise of dist-tag remove use this commands:
npm dist-tag rm <copied named from package.json>@1.0.1 beta
And to point the "Latest" tag to a different version use this command:
npm dist-tag add <copied named from package.json>@1.0.0
I hope this helps :)
Thanks all for following up on this issue! I think the solution has been already posted on the above like @BrunoWilkinson posted. I will close this as resolved, and please do not hesitate to open it again if you still can't fix it!
{
"name": "@murtaza23/workspace",
"version": "1.0.2",
"description": ",-----.,--. ,--. ,---. ,--.,------. ,------. ' .--./| | ,---. ,--.,--. ,-| || o \ | || .-. \ | .---' | | | || .-. || || |' .-. |..' | | || | \\ :|
--, ' '--'\| |' '-' '' '' '\ -' | .' / | || '--' /|
---. -----'
--' ---'
----' ---'
--' --'
-------' `------' -----------------------------------------------------------------",
"main": "server.js",
"dependencies": {
"@linclark/pkg": "^1.0.2"
},
"devDependencies": {},
"scripts": {
"test": "node test.js",
"start": "node server.js"
},
"author": "",
"license": "ISC",
"repository": {
"type": "git",
"url": "git://github.com/murtaza63/repository.git"
},
"bugs": {
"url": "https://github.com/murtaza63/repository/issues"
},
"homepage": "https://github.com/murtaza63/repository#readme"
}
I adding dist-tag with this command
$ npm dist-tag add @linclark/pkg@1.0.2 beta
and verify with this command
$ how-to-npm verify
but terminal shows this
Uh oh, looks like you still only have a single dist-tag.
Use npm help dist-tag
to learn how to add another one.
I am new back end please help me how to add dist tag off free code challange
C:\NodeApp\howtonpm>npm ls
@ankur01oct/howtonpm@1.0.1 C:\NodeApp\howtonpm
-- @linclark/pkg@1.0.2
copy '@ankur01oct/howtonpm@1.0.1'
it works!!!
C:\NodeApp\howtonpm>npm dist-tag add @ankur01oct/howtonpm@1.0.1 beta
+beta: @ankur01oct/howtonpm@1.0.1
`
nirmalrizal:~/workspace (master) $ npm dist-tag add npm-codecamp@1.0.1 ["npm-nodecamp"] npm ERR! Linux 4.2.0-c9 npm ERR! argv "/home/ubuntu/.nvm/versions/node/v4.5.0/bin/node" "/home/ubuntu/.nvm/versions/node/v4.5.0/bin/npm" "dist-tag" "add" "npm-codecamp@1.0.1" "[npm-nodecamp]" npm ERR! node v4.5.0 npm ERR! npm v3.10.7 npm ERR! code E404
npm ERR! 404 missing : -/package/npm-codecamp/dist-tags
npm ERR! Please include the following file with any support request: npm ERR! /home/ubuntu/workspace/npm-debug.log