Unable to npm install
Note: for support questions, please use one of these channels: https://github.com/angular/material2/blob/master/CONTRIBUTING.md#question. This repository's issues are reserved for feature requests and bug reports.
- Do you want to request a feature or report a bug? bug
- What is the current behavior? npm install --save @angular2-material/core @angular2-material/checkbox Above command returns the following error
0 info it worked if it ends with ok
1 verbose cli [ '/usr/local/bin/node',
1 verbose cli '/usr/local/bin/npm',
1 verbose cli 'install',
1 verbose cli '--save',
1 verbose cli '@angular2-material/core',
1 verbose cli '@angular2-material/checkbox' ]
2 info using [email protected]
3 info using [email protected]
4 silly loadCurrentTree Starting
5 silly install loadCurrentTree
6 silly install readLocalPackageData
7 silly fetchPackageMetaData @angular2-material/core
8 silly fetchPackageMetaData @angular2-material/checkbox
9 silly fetchNamedPackageData @angular2-material/core
10 silly mapToRegistry name @angular2-material/core
11 silly mapToRegistry scope (from package name) @angular2-material
12 verbose mapToRegistry no registry URL found in name for scope @angular2-material
13 silly mapToRegistry using default registry
14 silly mapToRegistry registry http://registry.npmjs.org/
15 silly mapToRegistry uri http://registry.npmjs.org/@angular2-material%2fcore
16 silly fetchNamedPackageData @angular2-material/checkbox
17 silly mapToRegistry name @angular2-material/checkbox
18 silly mapToRegistry scope (from package name) @angular2-material
19 verbose mapToRegistry no registry URL found in name for scope @angular2-material
20 silly mapToRegistry using default registry
21 silly mapToRegistry registry http://registry.npmjs.org/
22 silly mapToRegistry uri http://registry.npmjs.org/@angular2-material%2fcheckbox
23 verbose request uri http://registry.npmjs.org/@angular2-material%2fcore
24 verbose request no auth needed
25 info attempt registry request try #1 at 8:59:31 PM
26 verbose request id a1cb8c09654d7f04
27 verbose etag "2Z7V6Y7ALQCRPCRY4VA0WGX7A"
28 http request GET http://registry.npmjs.org/@angular2-material%2fcore
29 verbose request uri http://registry.npmjs.org/@angular2-material%2fcheckbox
30 verbose request no auth needed
31 info attempt registry request try #1 at 8:59:31 PM
32 verbose etag "3WHYEQIC1RHLT28AVBN5N6FQ5"
33 http request GET http://registry.npmjs.org/@angular2-material%2fcheckbox
34 http 304 http://registry.npmjs.org/@angular2-material%2fcheckbox
35 verbose headers { date: 'Mon, 28 Mar 2016 09:59:31 GMT',
35 verbose headers via: '1.1 varnish',
35 verbose headers 'cache-control': 'max-age=0',
35 verbose headers etag: '"3WHYEQIC1RHLT28AVBN5N6FQ5"',
35 verbose headers age: '0',
35 verbose headers connection: 'keep-alive',
35 verbose headers 'x-served-by': 'cache-mel6523-MEL',
35 verbose headers 'x-cache': 'MISS',
35 verbose headers 'x-cache-hits': '0',
35 verbose headers 'x-timer': 'S1459159171.443646,VS0,VE254',
35 verbose headers vary: 'Accept' }
36 silly get cb [ 304,
36 silly get { date: 'Mon, 28 Mar 2016 09:59:31 GMT',
36 silly get via: '1.1 varnish',
36 silly get 'cache-control': 'max-age=0',
36 silly get etag: '"3WHYEQIC1RHLT28AVBN5N6FQ5"',
36 silly get age: '0',
36 silly get connection: 'keep-alive',
36 silly get 'x-served-by': 'cache-mel6523-MEL',
36 silly get 'x-cache': 'MISS',
36 silly get 'x-cache-hits': '0',
36 silly get 'x-timer': 'S1459159171.443646,VS0,VE254',
36 silly get vary: 'Accept' } ]
37 verbose etag http://registry.npmjs.org/@angular2-material%2fcheckbox from cache
38 verbose get saving @angular2-material/checkbox to /Users/KK/.npm/registry.npmjs.org/_40angular2-material_252fcheckbox/.cache.json
39 http 304 http://registry.npmjs.org/@angular2-material%2fcore
40 verbose headers { date: 'Mon, 28 Mar 2016 09:59:31 GMT',
40 verbose headers via: '1.1 varnish',
40 verbose headers 'cache-control': 'max-age=0',
40 verbose headers etag: '"2Z7V6Y7ALQCRPCRY4VA0WGX7A"',
40 verbose headers age: '0',
40 verbose headers connection: 'keep-alive',
40 verbose headers 'x-served-by': 'cache-mel6521-MEL',
40 verbose headers 'x-cache': 'MISS',
40 verbose headers 'x-cache-hits': '0',
40 verbose headers 'x-timer': 'S1459159171.449307,VS0,VE1220',
40 verbose headers vary: 'Accept' }
41 silly get cb [ 304,
41 silly get { date: 'Mon, 28 Mar 2016 09:59:31 GMT',
41 silly get via: '1.1 varnish',
41 silly get 'cache-control': 'max-age=0',
41 silly get etag: '"2Z7V6Y7ALQCRPCRY4VA0WGX7A"',
41 silly get age: '0',
41 silly get connection: 'keep-alive',
41 silly get 'x-served-by': 'cache-mel6521-MEL',
41 silly get 'x-cache': 'MISS',
41 silly get 'x-cache-hits': '0',
41 silly get 'x-timer': 'S1459159171.449307,VS0,VE1220',
41 silly get vary: 'Accept' } ]
42 verbose etag http://registry.npmjs.org/@angular2-material%2fcore from cache
43 verbose get saving @angular2-material/core to /Users/KK/.npm/registry.npmjs.org/_40angular2-material_252fcore/.cache.json
44 silly install normalizeTree
45 silly loadCurrentTree Finishing
46 silly loadIdealTree Starting
47 silly install loadIdealTree
48 silly cloneCurrentTree Starting
49 silly install cloneCurrentTreeToIdealTree
50 silly cloneCurrentTree Finishing
51 silly loadShrinkwrap Starting
52 silly install loadShrinkwrap
53 silly loadShrinkwrap Finishing
54 silly loadAllDepsIntoIdealTree Starting
55 silly install loadAllDepsIntoIdealTree
56 silly resolveWithNewModule @angular2-material/[email protected] checking installable status
57 silly cache add args [ '@angular2-material/checkbox', null ]
58 verbose cache add spec @angular2-material/checkbox
59 silly resolveWithNewModule @angular2-material/[email protected] checking installable status
60 silly cache add args [ '@angular2-material/core', null ]
61 verbose cache add spec @angular2-material/core
62 silly cache add parsed spec Result {
62 silly cache add raw: '@angular2-material/checkbox',
62 silly cache add scope: '@angular2-material',
62 silly cache add name: '@angular2-material/checkbox',
62 silly cache add rawSpec: '',
62 silly cache add spec: '*',
62 silly cache add type: 'range' }
63 silly addNamed @angular2-material/checkbox@*
64 verbose addNamed "*" is a valid semver range for @angular2-material/checkbox
65 silly addNameRange { name: '@angular2-material/checkbox',
65 silly addNameRange range: '*',
65 silly addNameRange hasData: false }
66 silly mapToRegistry name @angular2-material/checkbox
67 silly mapToRegistry scope (from package name) @angular2-material
68 verbose mapToRegistry no registry URL found in name for scope @angular2-material
69 silly mapToRegistry using default registry
70 silly mapToRegistry registry http://registry.npmjs.org/
71 silly mapToRegistry uri http://registry.npmjs.org/@angular2-material%2fcheckbox
72 verbose addNameRange registry:http://registry.npmjs.org/@angular2-material%2fcheckbox not in flight; fetching
73 silly cache add parsed spec Result {
73 silly cache add raw: '@angular2-material/core',
73 silly cache add scope: '@angular2-material',
73 silly cache add name: '@angular2-material/core',
73 silly cache add rawSpec: '',
73 silly cache add spec: '*',
73 silly cache add type: 'range' }
74 silly addNamed @angular2-material/core@*
75 verbose addNamed "*" is a valid semver range for @angular2-material/core
76 silly addNameRange { name: '@angular2-material/core', range: '*', hasData: false }
77 silly mapToRegistry name @angular2-material/core
78 silly mapToRegistry scope (from package name) @angular2-material
79 verbose mapToRegistry no registry URL found in name for scope @angular2-material
80 silly mapToRegistry using default registry
81 silly mapToRegistry registry http://registry.npmjs.org/
82 silly mapToRegistry uri http://registry.npmjs.org/@angular2-material%2fcore
83 verbose addNameRange registry:http://registry.npmjs.org/@angular2-material%2fcore not in flight; fetching
84 verbose get http://registry.npmjs.org/@angular2-material%2fcheckbox not expired, no request
85 silly addNameRange number 2 { name: '@angular2-material/checkbox',
85 silly addNameRange range: '*',
85 silly addNameRange hasData: true }
86 silly addNameRange versions [ '@angular2-material/checkbox',
86 silly addNameRange [ '2.0.0-alpha.0', '2.0.0-alpha.1' ] ]
87 info addNameTag [ '@angular2-material/checkbox', 'latest' ]
88 silly mapToRegistry name @angular2-material/checkbox
89 silly mapToRegistry scope (from package name) @angular2-material
90 verbose mapToRegistry no registry URL found in name for scope @angular2-material
91 silly mapToRegistry using default registry
92 silly mapToRegistry registry http://registry.npmjs.org/
93 silly mapToRegistry uri http://registry.npmjs.org/@angular2-material%2fcheckbox
94 verbose addNameTag registry:http://registry.npmjs.org/@angular2-material%2fcheckbox already in flight; waiting
95 silly addNameTag next cb for @angular2-material/checkbox with tag latest
96 silly addNamed @angular2-material/[email protected]
97 verbose addNamed "2.0.0-alpha.1" is a plain semver version for @angular2-material/checkbox
98 verbose get http://registry.npmjs.org/@angular2-material%2fcore not expired, no request
99 silly addNameRange number 2 { name: '@angular2-material/core', range: '*', hasData: true }
100 silly addNameRange versions [ '@angular2-material/core',
100 silly addNameRange [ '2.0.0-alpha.0', '2.0.0-alpha.1' ] ]
101 info addNameTag [ '@angular2-material/core', 'latest' ]
102 silly mapToRegistry name @angular2-material/core
103 silly mapToRegistry scope (from package name) @angular2-material
104 verbose mapToRegistry no registry URL found in name for scope @angular2-material
105 silly mapToRegistry using default registry
106 silly mapToRegistry registry http://registry.npmjs.org/
107 silly mapToRegistry uri http://registry.npmjs.org/@angular2-material%2fcore
108 verbose addNameTag registry:http://registry.npmjs.org/@angular2-material%2fcore already in flight; waiting
109 silly addNameTag next cb for @angular2-material/core with tag latest
110 silly addNamed @angular2-material/[email protected]
111 verbose addNamed "2.0.0-alpha.1" is a plain semver version for @angular2-material/core
112 silly rollbackFailedOptional Starting
113 silly rollbackFailedOptional Finishing
114 silly runTopLevelLifecycles Starting
115 silly runTopLevelLifecycles Finishing
116 silly install printInstalled
117 verbose stack Error: Invalid name: "@angular2-material/core"
117 verbose stack at ensureValidName (/usr/local/lib/node_modules/npm/node_modules/read-package-json/node_modules/normalize-package-data/lib/fixer.js:297:15)
117 verbose 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)
117 verbose stack at /usr/local/lib/node_modules/npm/node_modules/read-package-json/node_modules/normalize-package-data/lib/normalize.js:29:38
117 verbose stack at Array.forEach (native)
117 verbose stack at normalize (/usr/local/lib/node_modules/npm/node_modules/read-package-json/node_modules/normalize-package-data/lib/normalize.js:28:15)
117 verbose stack at final (/usr/local/lib/node_modules/npm/node_modules/read-package-json/read-json.js:338:5)
117 verbose stack at then (/usr/local/lib/node_modules/npm/node_modules/read-package-json/read-json.js:113:5)
117 verbose stack at ReadFileContext.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/read-package-json/read-json.js:284:20)
117 verbose stack at ReadFileContext.callback (/usr/local/lib/node_modules/npm/node_modules/graceful-fs/graceful-fs.js:76:16)
117 verbose stack at FSReqWrap.readFileAfterOpen [as oncomplete] (fs.js:324:13)
118 verbose cwd /Users/KK/ggit/DealerNetworksGo/control/web
119 error Darwin 15.0.0
120 error argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "--save" "@angular2-material/core" "@angular2-material/checkbox"
121 error node v5.3.0
122 error npm v3.3.6
123 error Invalid name: "@angular2-material/core"
124 error If you need help, you may report this error at:
124 error <https://github.com/npm/npm/issues>
125 verbose exit [ 1, true ]
- If the current behavior is a bug, please provide steps to reproduce and if possible a minimal demo of the problem via https://plnkr.co or similar.
- What is the expected behavior?
- What is the motivation / use case for changing the behavior?
- Which version of Angular and Material, and which browser and OS does this issue affect? Did this work in previous versions of Angular / Material? Please also test with the latest stable and snapshot versions.
- Other information (e.g. detailed explanation, stacktraces, related issues, suggestions how to fix)
@KSanthanam just tried this with the same version of node and npm and it worked fine. I suspect it's something with your environment.
I have the exact same issue on the following versions:
npm ERR! node v6.0.0 npm ERR! npm v3.8.6
npm ERR! Invalid name: "@angular2-material/core"
@KSanthanam where you able to fix it?
------- EDIT -------
Ok I tried downgrading the node and npm versions, did not work so I literally completely uninstalled node and npm, did a clean installation instead of using "n" and did work.
If any one present this issue
This issue has been automatically locked due to inactivity. Please file a new issue if you are encountering a similar or related problem.
Read more about our automatic conversation locking policy.
This action has been performed automatically by a bot.