Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Invalid dependency name #23

Open
Kikobeats opened this issue Mar 6, 2016 · 12 comments
Open

Invalid dependency name #23

Kikobeats opened this issue Mar 6, 2016 · 12 comments

Comments

@Kikobeats
Copy link

npm install -g manpm
npm ERR! unpack Could not read data for @bahmutov/[email protected]
npm ERR! Darwin 15.3.0
npm ERR! argv "/usr/local/bin/iojs" "/usr/local/bin/npm" "install" "-g" "manpm"
npm ERR! node v4.3.0
npm ERR! npm  v2.14.12

npm ERR! Invalid name: "@bahmutov/parse-github-repo-url"
@bahmutov
Copy link
Owner

bahmutov commented Mar 6, 2016

what happens if you use newer npm version? 2.14 is very old and probably does not understand scoped dependencies.

@Kikobeats
Copy link
Author

npm install -g manpm

npm ERR! Darwin 15.3.0
npm ERR! argv "/usr/local/bin/iojs" "/usr/local/bin/npm" "install" "-g" "manpm"
npm ERR! node v5.7.0
npm ERR! npm  v3.6.0

btw I'm surprised because you consider npm bundle in node LTS too old

@bahmutov
Copy link
Owner

bahmutov commented Mar 6, 2016

same error? hmm that is very weird. I just guessed that 2.14 has problems with scoped names

@bahmutov
Copy link
Owner

bahmutov commented Mar 6, 2016

Try [email protected] ?

@Kikobeats
Copy link
Author

too :S

npm i [email protected] --global
npm ERR! unpack Could not read data for @bahmutov/[email protected]
/usr/local/lib
└── (empty)

npm ERR! Darwin 15.3.0
npm ERR! argv "/usr/local/bin/iojs" "/usr/local/bin/npm" "i" "[email protected]" "--global"
npm ERR! node v5.7.0
npm ERR! npm  v3.6.0

npm ERR! Invalid name: "@bahmutov/parse-github-repo-url"

@bahmutov
Copy link
Owner

bahmutov commented Mar 6, 2016

hmm, that is very very weird!
what does npm info @bahmutov/parse-github-repo-url do? Is there a problem with npm registry proxy perhaps?

@Kikobeats
Copy link
Author

npm info @bahmutov/parse-github-repo-url looks well. I'm not using a proxy

@bahmutov
Copy link
Owner

bahmutov commented Mar 6, 2016

Ok, then let us try doing npm i -g manpm --verbose

@Kikobeats
Copy link
Author

I pasted the interesting part:

npm http 304 https://registry.npmjs.org/@bahmutov%2fparse-github-repo-url
npm verb headers { 'cache-control': 'max-age=0',
npm verb headers   'accept-ranges': 'bytes',
npm verb headers   date: 'Sun, 06 Mar 2016 15:28:16 GMT',
npm verb headers   via: '1.1 varnish',
npm verb headers   connection: 'keep-alive',
npm verb headers   'x-served-by': 'cache-ams4134-AMS',
npm verb headers   'x-cache': 'MISS',
npm verb headers   'x-cache-hits': '0',
npm verb headers   'x-timer': 'S1457278096.074225,VS0,VE863' }
npm verb etag https://registry.npmjs.org/@bahmutov%2fparse-github-repo-url from cache
npm verb get saving @bahmutov/parse-github-repo-url to /Users/josefranciscoverdugambin/.npm/registry.npmjs.org/_40bahmutov_252fparse-github-repo-url/.cache.json
npm verb correctMkdir /Users/josefranciscoverdugambin/.npm correctMkdir not in flight; initializing
npm verb cache add spec @bahmutov/[email protected]
npm verb addNamed "0.1.0" is a plain semver version for @bahmutov/parse-github-repo-url
npm verb mapToRegistry no registry URL found in name for scope @bahmutov
npm verb addNameVersion registry:https://registry.npmjs.org/@bahmutov%2fparse-github-repo-url not in flight; fetching
npm verb get https://registry.npmjs.org/@bahmutov%2fparse-github-repo-url not expired, no request
npm verb updateRemote git fetch -a origin (https://github.com/mikaelbr/marked-terminal.git)
npm verb correctMkdir /Users/josefranciscoverdugambin/.npm/_git-remotes correctMkdir not in flight; initializing
npm verb setPermissions git+https://github.com/mikaelbr/marked-terminal.git#35f6ddac9d9f32b11e85ceb6bc5f42642f06e456 set permissions on /Users/josefranciscoverdugambin/.npm/_git-remotes/git-https-github-com-mikaelbr-marked-terminal-git-35f6ddac9d9f32b11e85ceb6bc5f42642f06e456-38fe6d1d
npm verb resolveHead git+https://github.com/mikaelbr/marked-terminal.git#35f6ddac9d9f32b11e85ceb6bc5f42642f06e456 original treeish: 35f6ddac9d9f32b11e85ceb6bc5f42642f06e456
npm info git [ 'rev-list', '-n1', '35f6ddac9d9f32b11e85ceb6bc5f42642f06e456' ]
npm verb resolveHead git+https://github.com/mikaelbr/marked-terminal.git#35f6ddac9d9f32b11e85ceb6bc5f42642f06e456 resolved Git URL: git+https://github.com/mikaelbr/marked-terminal.git#35f6ddac9d9f32b11e85ceb6bc5f42642f06e456
npm info git [ 'clone',
npm info git   '/Users/josefranciscoverdugambin/.npm/_git-remotes/git-https-github-com-mikaelbr-marked-terminal-git-35f6ddac9d9f32b11e85ceb6bc5f42642f06e456-38fe6d1d',
npm info git   '/var/folders/m0/xgqrbttj0mxg9s1vrcj_ypq00000gn/T/npm-24378-7ce603d5/git-cache-9f8a507d/35f6ddac9d9f32b11e85ceb6bc5f42642f06e456' ]
npm verb cloneResolved git+https://github.com/mikaelbr/marked-terminal.git#35f6ddac9d9f32b11e85ceb6bc5f42642f06e456 clone Cloning into '/var/folders/m0/xgqrbttj0mxg9s1vrcj_ypq00000gn/T/npm-24378-7ce603d5/git-cache-9f8a507d/35f6ddac9d9f32b11e85ceb6bc5f42642f06e456'...
npm verb cloneResolved done.
npm info git [ 'checkout', '35f6ddac9d9f32b11e85ceb6bc5f42642f06e456' ]
npm verb checkoutTreeish git+https://github.com/mikaelbr/marked-terminal.git#35f6ddac9d9f32b11e85ceb6bc5f42642f06e456 checkout Note: checking out '35f6ddac9d9f32b11e85ceb6bc5f42642f06e456'.
npm verb checkoutTreeish
npm verb checkoutTreeish You are in 'detached HEAD' state. You can look around, make experimental
npm verb checkoutTreeish changes and commit them, and you can discard any commits you make in this
npm verb checkoutTreeish state without impacting any branches by performing another checkout.
npm verb checkoutTreeish
npm verb checkoutTreeish If you want to create a new branch to retain commits you create, you may
npm verb checkoutTreeish do so (now or later) by using -b with the checkout command again. Example:
npm verb checkoutTreeish
npm verb checkoutTreeish   git checkout -b <new-branch-name>
npm verb checkoutTreeish
npm verb checkoutTreeish HEAD is now at 35f6dda... Merge pull request #21 from IonicaBizauKitchen/master
npm verb addLocalDirectory /Users/josefranciscoverdugambin/.npm/marked-terminal/1.6.1/package.tgz not in flight; packing
npm verb correctMkdir /Users/josefranciscoverdugambin/.npm correctMkdir not in flight; initializing
npm verb tar pack [ '/Users/josefranciscoverdugambin/.npm/marked-terminal/1.6.1/package.tgz',
npm verb tar pack   '/var/folders/m0/xgqrbttj0mxg9s1vrcj_ypq00000gn/T/npm-24378-7ce603d5/git-cache-9f8a507d/35f6ddac9d9f32b11e85ceb6bc5f42642f06e456' ]
npm verb tarball /Users/josefranciscoverdugambin/.npm/marked-terminal/1.6.1/package.tgz
npm verb folder /var/folders/m0/xgqrbttj0mxg9s1vrcj_ypq00000gn/T/npm-24378-7ce603d5/git-cache-9f8a507d/35f6ddac9d9f32b11e85ceb6bc5f42642f06e456
npm verb addLocalTarball adding from inside cache /Users/josefranciscoverdugambin/.npm/marked-terminal/1.6.1/package.tgz
npm verb correctMkdir /Users/josefranciscoverdugambin/.npm correctMkdir not in flight; initializing
npm verb addRemoteGit data._from: git+https://github.com/mikaelbr/marked-terminal.git#35f6ddac9d9f32b11e85ceb6bc5f42642f06e456
npm verb addRemoteGit data._resolved: git+https://github.com/mikaelbr/marked-terminal.git#35f6ddac9d9f32b11e85ceb6bc5f42642f06e456
npm verb afterAdd /Users/josefranciscoverdugambin/.npm/marked-terminal/1.6.1/package/package.json not in flight; writing
npm verb correctMkdir /Users/josefranciscoverdugambin/.npm correctMkdir not in flight; initializing
npm verb afterAdd /Users/josefranciscoverdugambin/.npm/marked-terminal/1.6.1/package/package.json written
npm verb stack Error: Invalid name: "@bahmutov/parse-github-repo-url"
npm verb stack     at ensureValidName (/usr/local/lib/node_modules/npm/node_modules/read-package-json/node_modules/normalize-package-data/lib/fixer.js:297:15)
npm verb stack     at Object.module.exports.fixNameField (/usr/local/lib/node_modules/npm/node_modules/read-package-json/node_modules/normalize-package-data/lib/fixer.js:201:5)
npm verb stack     at /usr/local/lib/node_modules/npm/node_modules/read-package-json/node_modules/normalize-package-data/lib/normalize.js:29:38
npm verb stack     at Array.forEach (native)
npm verb stack     at normalize (/usr/local/lib/node_modules/npm/node_modules/read-package-json/node_modules/normalize-package-data/lib/normalize.js:28:15)
npm verb stack     at final (/usr/local/lib/node_modules/npm/node_modules/read-package-json/read-json.js:338:5)
npm verb stack     at then (/usr/local/lib/node_modules/npm/node_modules/read-package-json/read-json.js:113:5)
npm verb stack     at serverjs_ (/usr/local/lib/node_modules/npm/node_modules/read-package-json/read-json.js:166:29)
npm verb stack     at /usr/local/lib/node_modules/npm/node_modules/read-package-json/read-json.js:161:5
npm verb stack     at f (/usr/local/lib/node_modules/npm/node_modules/once/once.js:17:25)
npm verb cwd /Users/josefranciscoverdugambin/Projects/existential-default
npm ERR! Darwin 15.3.0
npm ERR! argv "/usr/local/bin/iojs" "/usr/local/bin/npm" "i" "-g" "manpm" "--verbose"
npm ERR! node v5.7.1
npm ERR! npm  v3.6.0

npm ERR! Invalid name: "@bahmutov/parse-github-repo-url"

@bahmutov
Copy link
Owner

bahmutov commented Mar 6, 2016

damn, this is why I suspect something is not kosher with your npm version (?).
What I don't understand why it prints the argv as [iojs] and uses "/usr/local/bin/npm" instead of going through the user folder. Are you using NVM to switch versions?
Here is what I would expect from npm info command

npm ERR! Darwin 15.3.0
npm ERR! argv "/Users/kensho/.nvm/versions/node/v5.1.0/bin/node" "/Users/kensho/.nvm/versions/node/v5.1.0/bin/npm" "info"
npm ERR! node v5.1.0
npm ERR! npm  v3.7.2

@Kikobeats
Copy link
Author

I use n for switch version, but what happens?

@bahmutov
Copy link
Owner

bahmutov commented Mar 6, 2016

not sure what n does. I am afraid in this case, you will need to hunt down the versions and the actual code that does not understand the scoped dependency name

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants