npm / npm

This repository is moving to: https://github.com/npm/cli
http://npm.community
17.53k stars 3.02k forks source link

BUG - invalid package name #4615

Closed athlan closed 10 years ago

athlan commented 10 years ago

I have an issue when I run npm publish on package: https://github.com/getfokus/brand24-api-nodejs

Cli output:

Aths-MacBook-Pro:brand24-api-nodejs ath$ npm publish
npm http PUT https://registry.npmjs.org/brand24-api-nodejs
npm http 403 https://registry.npmjs.org/brand24-api-nodejs
npm http PUT https://registry.npmjs.org/brand24-api-nodejs
npm http 403 https://registry.npmjs.org/brand24-api-nodejs
npm ERR! publish Failed PUT response 403
npm ERR! Error: forbidden name invalid: undefined: brand24-api-nodejs
npm ERR!     at RegClient.<anonymous> (/opt/local/lib/node_modules/npm/node_modules/npm-registry-client/lib/request.js:272:14)
npm ERR!     at Request.self.callback (/opt/local/lib/node_modules/npm/node_modules/request/index.js:148:22)
npm ERR!     at Request.EventEmitter.emit (events.js:98:17)
npm ERR!     at Request.<anonymous> (/opt/local/lib/node_modules/npm/node_modules/request/index.js:876:14)
npm ERR!     at Request.EventEmitter.emit (events.js:117:20)
npm ERR!     at IncomingMessage.<anonymous> (/opt/local/lib/node_modules/npm/node_modules/request/index.js:827:12)
npm ERR!     at IncomingMessage.EventEmitter.emit (events.js:117:20)
npm ERR!     at _stream_readable.js:910:16
npm ERR!     at process._tickCallback (node.js:415:13)
npm ERR! If you need help, you may report this log at:
npm ERR!     <http://github.com/isaacs/npm/issues>
npm ERR! or email it to:
npm ERR!     <npm-@googlegroups.com>

npm ERR! System Darwin 10.8.0
npm ERR! command "node" "/opt/local/bin/npm" "publish"
npm ERR! cwd /ServerDisc2/fokus/brand24-api-nodejs
npm ERR! node -v v0.10.12
npm ERR! npm -v 1.3.4
npm ERR! 
npm ERR! Additional logging details can be found in:
npm ERR!     /ServerDisc2/fokus/brand24-api-nodejs/npm-debug.log
npm ERR! not ok code 0

npm-debug.log contents:

0 info it worked if it ends with ok
1 verbose cli [ 'node', '/opt/local/bin/npm', 'publish' ]
2 info using npm@1.3.4
3 info using node@v0.10.12
4 verbose publish [ '.' ]
5 verbose cache add [ '.', null ]
6 verbose cache add name=undefined spec="." args=[".",null]
7 verbose parsed url { protocol: null,
7 verbose parsed url   slashes: null,
7 verbose parsed url   auth: null,
7 verbose parsed url   host: null,
7 verbose parsed url   port: null,
7 verbose parsed url   hostname: null,
7 verbose parsed url   hash: null,
7 verbose parsed url   search: null,
7 verbose parsed url   query: null,
7 verbose parsed url   pathname: '.',
7 verbose parsed url   path: '.',
7 verbose parsed url   href: '.' }
8 silly lockFile 3a52ce78- .
9 verbose lock . /Users/ath/.npm/3a52ce78-.lock
10 verbose tar pack [ '/var/folders/3L/3LQdy4BPGbCnU+J-UUe+8k+++TI/-Tmp-/npm-27240-zAreHC_w/1391647772727-0.02123551839031279/tmp.tgz',
10 verbose tar pack   '.' ]
11 verbose tarball /var/folders/3L/3LQdy4BPGbCnU+J-UUe+8k+++TI/-Tmp-/npm-27240-zAreHC_w/1391647772727-0.02123551839031279/tmp.tgz
12 verbose folder .
13 info prepublish brand24-api-nodejs@0.0.1
14 silly lockFile 1f1177db-tar tar://.
15 verbose lock tar://. /Users/ath/.npm/1f1177db-tar.lock
16 silly lockFile 41e039e1-2727-0-02123551839031279-tmp-tgz tar:///var/folders/3L/3LQdy4BPGbCnU+J-UUe+8k+++TI/-Tmp-/npm-27240-zAreHC_w/1391647772727-0.02123551839031279/tmp.tgz
17 verbose lock tar:///var/folders/3L/3LQdy4BPGbCnU+J-UUe+8k+++TI/-Tmp-/npm-27240-zAreHC_w/1391647772727-0.02123551839031279/tmp.tgz /Users/ath/.npm/41e039e1-2727-0-02123551839031279-tmp-tgz.lock
18 silly lockFile 1f1177db-tar tar://.
19 silly lockFile 1f1177db-tar tar://.
20 silly lockFile 41e039e1-2727-0-02123551839031279-tmp-tgz tar:///var/folders/3L/3LQdy4BPGbCnU+J-UUe+8k+++TI/-Tmp-/npm-27240-zAreHC_w/1391647772727-0.02123551839031279/tmp.tgz
21 silly lockFile 41e039e1-2727-0-02123551839031279-tmp-tgz tar:///var/folders/3L/3LQdy4BPGbCnU+J-UUe+8k+++TI/-Tmp-/npm-27240-zAreHC_w/1391647772727-0.02123551839031279/tmp.tgz
22 verbose tar unpack /var/folders/3L/3LQdy4BPGbCnU+J-UUe+8k+++TI/-Tmp-/npm-27240-zAreHC_w/1391647772727-0.02123551839031279/tmp.tgz
23 silly lockFile 874fd944-2727-0-02123551839031279-package tar:///var/folders/3L/3LQdy4BPGbCnU+J-UUe+8k+++TI/-Tmp-/npm-27240-zAreHC_w/1391647772727-0.02123551839031279/package
24 verbose lock tar:///var/folders/3L/3LQdy4BPGbCnU+J-UUe+8k+++TI/-Tmp-/npm-27240-zAreHC_w/1391647772727-0.02123551839031279/package /Users/ath/.npm/874fd944-2727-0-02123551839031279-package.lock
25 silly lockFile 41e039e1-2727-0-02123551839031279-tmp-tgz tar:///var/folders/3L/3LQdy4BPGbCnU+J-UUe+8k+++TI/-Tmp-/npm-27240-zAreHC_w/1391647772727-0.02123551839031279/tmp.tgz
26 verbose lock tar:///var/folders/3L/3LQdy4BPGbCnU+J-UUe+8k+++TI/-Tmp-/npm-27240-zAreHC_w/1391647772727-0.02123551839031279/tmp.tgz /Users/ath/.npm/41e039e1-2727-0-02123551839031279-tmp-tgz.lock
27 silly gunzTarPerm modes [ '755', '644' ]
28 silly gunzTarPerm extractEntry package.json
29 silly gunzTarPerm extractEntry .npmignore
30 silly gunzTarPerm extractEntry README.md
31 silly gunzTarPerm extractEntry index.js
32 silly gunzTarPerm extractEntry examples/_credentials.js
33 silly gunzTarPerm extractEntry examples/project-add.js
34 silly gunzTarPerm extractEntry examples/project-delete.js
35 silly gunzTarPerm extractEntry examples/project-info.js
36 silly gunzTarPerm extractEntry examples/project-list.js
37 silly gunzTarPerm extractEntry examples/results-count.js
38 silly gunzTarPerm extractEntry examples/results.js
39 silly gunzTarPerm extractEntry lib/client.js
40 silly gunzTarPerm extractEntry lib/transport.js
41 silly lockFile 874fd944-2727-0-02123551839031279-package tar:///var/folders/3L/3LQdy4BPGbCnU+J-UUe+8k+++TI/-Tmp-/npm-27240-zAreHC_w/1391647772727-0.02123551839031279/package
42 silly lockFile 874fd944-2727-0-02123551839031279-package tar:///var/folders/3L/3LQdy4BPGbCnU+J-UUe+8k+++TI/-Tmp-/npm-27240-zAreHC_w/1391647772727-0.02123551839031279/package
43 silly lockFile 41e039e1-2727-0-02123551839031279-tmp-tgz tar:///var/folders/3L/3LQdy4BPGbCnU+J-UUe+8k+++TI/-Tmp-/npm-27240-zAreHC_w/1391647772727-0.02123551839031279/tmp.tgz
44 silly lockFile 41e039e1-2727-0-02123551839031279-tmp-tgz tar:///var/folders/3L/3LQdy4BPGbCnU+J-UUe+8k+++TI/-Tmp-/npm-27240-zAreHC_w/1391647772727-0.02123551839031279/tmp.tgz
45 verbose tar pack [ '/Users/ath/.npm/brand24-api-nodejs/0.0.1/package.tgz',
45 verbose tar pack   '/var/folders/3L/3LQdy4BPGbCnU+J-UUe+8k+++TI/-Tmp-/npm-27240-zAreHC_w/1391647772727-0.02123551839031279/package' ]
46 verbose tarball /Users/ath/.npm/brand24-api-nodejs/0.0.1/package.tgz
47 verbose folder /var/folders/3L/3LQdy4BPGbCnU+J-UUe+8k+++TI/-Tmp-/npm-27240-zAreHC_w/1391647772727-0.02123551839031279/package
48 silly lockFile 874fd944-2727-0-02123551839031279-package tar:///var/folders/3L/3LQdy4BPGbCnU+J-UUe+8k+++TI/-Tmp-/npm-27240-zAreHC_w/1391647772727-0.02123551839031279/package
49 verbose lock tar:///var/folders/3L/3LQdy4BPGbCnU+J-UUe+8k+++TI/-Tmp-/npm-27240-zAreHC_w/1391647772727-0.02123551839031279/package /Users/ath/.npm/874fd944-2727-0-02123551839031279-package.lock
50 silly lockFile 8251b22d-d24-api-nodejs-0-0-1-package-tgz tar:///Users/ath/.npm/brand24-api-nodejs/0.0.1/package.tgz
51 verbose lock tar:///Users/ath/.npm/brand24-api-nodejs/0.0.1/package.tgz /Users/ath/.npm/8251b22d-d24-api-nodejs-0-0-1-package-tgz.lock
52 silly lockFile 874fd944-2727-0-02123551839031279-package tar:///var/folders/3L/3LQdy4BPGbCnU+J-UUe+8k+++TI/-Tmp-/npm-27240-zAreHC_w/1391647772727-0.02123551839031279/package
53 silly lockFile 874fd944-2727-0-02123551839031279-package tar:///var/folders/3L/3LQdy4BPGbCnU+J-UUe+8k+++TI/-Tmp-/npm-27240-zAreHC_w/1391647772727-0.02123551839031279/package
54 silly lockFile 8251b22d-d24-api-nodejs-0-0-1-package-tgz tar:///Users/ath/.npm/brand24-api-nodejs/0.0.1/package.tgz
55 silly lockFile 8251b22d-d24-api-nodejs-0-0-1-package-tgz tar:///Users/ath/.npm/brand24-api-nodejs/0.0.1/package.tgz
56 silly lockFile 07b4d993-brand24-api-nodejs-0-0-1-package /Users/ath/.npm/brand24-api-nodejs/0.0.1/package
57 verbose lock /Users/ath/.npm/brand24-api-nodejs/0.0.1/package /Users/ath/.npm/07b4d993-brand24-api-nodejs-0-0-1-package.lock
58 silly lockFile 07b4d993-brand24-api-nodejs-0-0-1-package /Users/ath/.npm/brand24-api-nodejs/0.0.1/package
59 silly lockFile 07b4d993-brand24-api-nodejs-0-0-1-package /Users/ath/.npm/brand24-api-nodejs/0.0.1/package
60 verbose tar unpack /Users/ath/.npm/brand24-api-nodejs/0.0.1/package.tgz
61 silly lockFile 93f78ee2-brand24-api-nodejs-0-0-1-package tar:///Users/ath/.npm/brand24-api-nodejs/0.0.1/package
62 verbose lock tar:///Users/ath/.npm/brand24-api-nodejs/0.0.1/package /Users/ath/.npm/93f78ee2-brand24-api-nodejs-0-0-1-package.lock
63 silly lockFile 8251b22d-d24-api-nodejs-0-0-1-package-tgz tar:///Users/ath/.npm/brand24-api-nodejs/0.0.1/package.tgz
64 verbose lock tar:///Users/ath/.npm/brand24-api-nodejs/0.0.1/package.tgz /Users/ath/.npm/8251b22d-d24-api-nodejs-0-0-1-package-tgz.lock
65 silly gunzTarPerm modes [ '755', '644' ]
66 silly gunzTarPerm extractEntry package.json
67 silly gunzTarPerm extractEntry .npmignore
68 silly gunzTarPerm extractEntry README.md
69 silly gunzTarPerm extractEntry index.js
70 silly gunzTarPerm extractEntry examples/_credentials.js
71 silly gunzTarPerm extractEntry examples/project-add.js
72 silly gunzTarPerm extractEntry examples/project-delete.js
73 silly gunzTarPerm extractEntry examples/project-info.js
74 silly gunzTarPerm extractEntry examples/project-list.js
75 silly gunzTarPerm extractEntry examples/results-count.js
76 silly gunzTarPerm extractEntry examples/results.js
77 silly gunzTarPerm extractEntry lib/client.js
78 silly gunzTarPerm extractEntry lib/transport.js
79 silly lockFile 93f78ee2-brand24-api-nodejs-0-0-1-package tar:///Users/ath/.npm/brand24-api-nodejs/0.0.1/package
80 silly lockFile 93f78ee2-brand24-api-nodejs-0-0-1-package tar:///Users/ath/.npm/brand24-api-nodejs/0.0.1/package
81 silly lockFile 8251b22d-d24-api-nodejs-0-0-1-package-tgz tar:///Users/ath/.npm/brand24-api-nodejs/0.0.1/package.tgz
82 silly lockFile 8251b22d-d24-api-nodejs-0-0-1-package-tgz tar:///Users/ath/.npm/brand24-api-nodejs/0.0.1/package.tgz
83 verbose chmod /Users/ath/.npm/brand24-api-nodejs/0.0.1/package.tgz 644
84 verbose chown /Users/ath/.npm/brand24-api-nodejs/0.0.1/package.tgz [ 501, 20 ]
85 silly lockFile 3a52ce78- .
86 silly lockFile 3a52ce78- .
87 silly publish { name: 'brand24-api-nodejs',
87 silly publish   author: { name: 'Piotr Pelczar' },
87 silly publish   contributors: [],
87 silly publish   description: 'Brand24 Node.js Api Client',
87 silly publish   version: '0.0.1',
87 silly publish   scripts: {},
87 silly publish   repository:
87 silly publish    { type: 'git',
87 silly publish      url: 'git://github.com/getfokus/brand24-api-nodejs' },
87 silly publish   bugs: { url: 'https://github.com/getfokus/brand24-api-nodejs/issues' },
87 silly publish   main: 'index.js',
87 silly publish   engines: { node: '>=0.4.7' },
87 silly publish   dependencies: { xml2js: '>=0.4.1' },
87 silly publish   devDependencies: {},
87 silly publish   directories: { example: 'examples' },
87 silly publish   keywords: [ 'brand24', 'api' ],
87 silly publish   license: 'BSD',
87 silly publish   readme: 'Node.js library for Brand24\n==================\n\nThis library is an API client for Brand24 services. Please contact brand24 team for API documentation. Some examples are decribed in this paper.\n\n###Author & Contact\n----------------\n\nPiotr *Athlan* Pelczar\n    - me@athlan.pl\n\nInstallation\n------------------\n\n###npm\n----------------\n\n```\nnpm install brand24-api-nodejs\n```\n\n###Define dependency in `package.json`\n\n```\n"require": {\n    "brand24-api-nodejs": "*"\n},\n```\n\nUsage instructions\n------------------\n\n### `GET` request\n----------------\n\nTo make `GET` request just use:\n```js\napi.get(\'/endpoint\', {\n\turlparam1: \'urlvalue1\'\n}, function(err, result) {\n\t// ...\n})\n```\n\n### `POST` request\n----------------\n\nTo make `POST` request just use:\n```js\napi.post(\'/endpoint\', {\n\turlparam1: \'urlvalue1\'\n}, {\n\tpostparam1: \'postvalue1\'\n}, function(err, result) {\n\t// ...\n})\n```\n\nExamples\n---\n\n### Get project info\n```js\nvar Brand24 = require(\'brand24-api-nodejs\')\n\nvar accountId = 12345\nvar apiKey = \'xxx\'\n\nvar client = Brand24.createClient(accountId, apiKey)\nvar api = Brand24.createTransport(client)\n\nvar projectId = 12345\n\napi.get(\'/project-info\', {\n\tsid: projectId\n}, function(err, result) {\n\t\n\tif(null === err) {\n\t\tconsole.log("Project info:")\n\t\tconsole.log(require(\'util\').inspect(result, true, 10))\n\t}\n\telse {\n\t\tconsole.log("Error occured:")\n\t\tconsole.log(err)\n\t}\n})\n```\n\n### Add project\n\n```js\nvar Brand24 = require(\'brand24-api-nodejs\')\n\nvar accountId = 12345\nvar apiKey = \'xxx\'\n\nvar client = Brand24.createClient(accountId, apiKey)\nvar api = Brand24.createTransport(client)\n\napi.post(\'/project-add\', {\n}, {\n\taid: accountId,\n\tname: \'Test project\',\n\t"phrases_relevant": [\n\t\t"brand24"\n\t]\n}, function(err, result) {\n\t\n\tif(null === err) {\n\t\tconsole.log("Project info:")\n\t\tconsole.log(require(\'util\').inspect(result, true, 10))\n\t}\n\telse {\n\t\tconsole.log("Error occured:")\n\t\tconsole.log(err)\n\t}\n})\n```\n\n### Delete project\n\n```js\nvar Brand24 = require(\'brand24-api-nodejs\')\n\nvar accountId = 12345\nvar apiKey = \'xxx\'\n\nvar client = Brand24.createClient(accountId, apiKey)\nvar api = Brand24.createTransport(client)\n\nvar projectIdToDelete = 12345\n\napi.get(\'/project-delete\', {\n\tsid: projectIdToDelete,\n\taid: accountId\n}, function(err, result) {\n\t\n\tif(null === err) {\n\t\tconsole.log("Project info:")\n\t\tconsole.log(require(\'util\').inspect(result, true, 10))\n\t}\n\telse {\n\t\tconsole.log("Error occured:")\n\t\tconsole.log(err)\n\t}\n})\n```\n\n### Get Mentions\n\n```js\nvar Brand24 = require(\'brand24-api-nodejs\')\n\nvar accountId = 12345\nvar apiKey = \'xxx\'\n\nvar client = Brand24.createClient(accountId, apiKey)\nvar api = Brand24.createTransport(client)\n\nvar projectId = 12345\n\napi.get(\'/results\', {\n\tsid: projectId,\n\tcount: 15\n}, function(err, result) {\n\t\n\tif(null === err) {\n\t\tconsole.log("Results:")\n\t\tconsole.log(require(\'util\').inspect(result, true, 10))\n\t}\n\telse {\n\t\tconsole.log("Error occured:")\n\t\tconsole.log(err)\n\t}\n})\n```\n\n### Get Mentions Count\n\n```js\nvar Brand24 = require(\'brand24-api-nodejs\')\n\nvar accountId = 12345\nvar apiKey = \'xxx\'\n\nvar client = Brand24.createClient(accountId, apiKey)\nvar api = Brand24.createTransport(client)\n\nvar projectId = 12345\n\napi.request(\'GET\', \'/results-count\', {\n\tsid: projectId,\n\td1: \'2014-01-01\',\n\td2: \'2014-01-30\',\n\tgroup: \'day\'\n}, function(err, result) {\n\t\n\tif(null === err) {\n\t\tconsole.log("Results:")\n\t\tconsole.log(require(\'util\').inspect(result, true, 10))\n\t}\n\telse {\n\t\tconsole.log("Error occured:")\n\t\tconsole.log(err)\n\t}\n})\n```\n',
87 silly publish   readmeFilename: 'README.md',
87 silly publish   _id: 'brand24-api-nodejs@0.0.1',
87 silly publish   dist: { shasum: '9bf0fb1b5a9ff03bae76be5109c988cbcb0b8497' },
87 silly publish   _from: '.' }
88 verbose url raw brand24-api-nodejs
89 verbose url resolving [ 'https://registry.npmjs.org/', './brand24-api-nodejs' ]
90 verbose url resolved https://registry.npmjs.org/brand24-api-nodejs
91 info trying registry request attempt 1 at 01:49:32
92 http PUT https://registry.npmjs.org/brand24-api-nodejs
93 http 403 https://registry.npmjs.org/brand24-api-nodejs
94 info trying registry request attempt 1 at 01:49:34
95 http PUT https://registry.npmjs.org/brand24-api-nodejs
96 http 403 https://registry.npmjs.org/brand24-api-nodejs
97 error publish Failed PUT response 403
98 error Error: forbidden name invalid: undefined: brand24-api-nodejs
98 error     at RegClient.<anonymous> (/opt/local/lib/node_modules/npm/node_modules/npm-registry-client/lib/request.js:272:14)
98 error     at Request.self.callback (/opt/local/lib/node_modules/npm/node_modules/request/index.js:148:22)
98 error     at Request.EventEmitter.emit (events.js:98:17)
98 error     at Request.<anonymous> (/opt/local/lib/node_modules/npm/node_modules/request/index.js:876:14)
98 error     at Request.EventEmitter.emit (events.js:117:20)
98 error     at IncomingMessage.<anonymous> (/opt/local/lib/node_modules/npm/node_modules/request/index.js:827:12)
98 error     at IncomingMessage.EventEmitter.emit (events.js:117:20)
98 error     at _stream_readable.js:910:16
98 error     at process._tickCallback (node.js:415:13)
99 error If you need help, you may report this log at:
99 error     <http://github.com/isaacs/npm/issues>
99 error or email it to:
99 error     <npm-@googlegroups.com>
100 error System Darwin 10.8.0
101 error command "node" "/opt/local/bin/npm" "publish"
102 error cwd /ServerDisc2/fokus/brand24-api-nodejs
103 error node -v v0.10.12
104 error npm -v 1.3.4
105 verbose exit [ 1, true ]
rrott commented 10 years ago

The same issue on mac. On linux I have another error for the same package: System Linux 3.11.0-15-generic node -v v0.10.15 npm -v 1.3.7 ... npm http 400 https://registry.npmjs.org/grunt-coffee-chain/-/grunt-coffee-chain-1.2.1.tgz/-rev/26-48fdf900d564e42f0e4945b3a6aaf643 npm ERR! registry error parsing json npm ERR! publish Error uploading package npm ERR! SyntaxError: Unexpected token < npm ERR! <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN"> npm ERR! npm ERR! 400 Bad Request npm ERR! ...

kenany commented 10 years ago
npm ERR! Error: forbidden name invalid: undefined: brand24-api-nodejs

Dupe of #4613?

athlan commented 10 years ago

Fixed.