x)- [x] bug report -> please search issues before submitting
- [ ] feature request
lucky:~ nihy$ node -v
v6.10.1
lucky:~ nihy$ npm -v
3.10.10
OS X Sierra 10.12.3
npm i -g @angular/cli
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 '-g',
1 verbose cli '@angular/cli' ]
2 info using [email protected]
3 info using [email protected]
4 silly loadCurrentTree Starting
5 silly install loadCurrentTree
6 silly install readGlobalPackageData
7 silly fetchPackageMetaData @angular/cli
8 silly fetchNamedPackageData @angular/cli
9 silly mapToRegistry name @angular/cli
10 silly mapToRegistry scope (from package name) @angular
11 verbose mapToRegistry no registry URL found in name for scope @angular
12 silly mapToRegistry using default registry
13 silly mapToRegistry registry https://registry.npmjs.org/
14 silly mapToRegistry data Result {
14 silly mapToRegistry raw: '@angular/cli',
14 silly mapToRegistry scope: '@angular',
14 silly mapToRegistry escapedName: '@angular%2fcli',
14 silly mapToRegistry name: '@angular/cli',
14 silly mapToRegistry rawSpec: '',
14 silly mapToRegistry spec: 'latest',
14 silly mapToRegistry type: 'tag' }
15 silly mapToRegistry uri https://registry.npmjs.org/@angular%2fcli
16 verbose request uri https://registry.npmjs.org/@angular%2fcli
17 verbose request no auth needed
18 info attempt registry request try #1 at 5:57:21 PM
19 verbose request id f18a6668c8576650
20 verbose etag W/"58d49f18-ea65"
21 verbose lastModified Fri, 24 Mar 2017 04:22:48 GMT
22 http request GET https://registry.npmjs.org/@angular%2fcli
23 http 304 https://registry.npmjs.org/@angular%2fcli
24 verbose headers { date: 'Sat, 25 Mar 2017 21:57:21 GMT',
24 verbose headers via: '1.1 varnish',
24 verbose headers 'cache-control': 'max-age=0',
24 verbose headers etag: 'W/"58d49f18-ea65"',
24 verbose headers age: '0',
24 verbose headers connection: 'keep-alive',
24 verbose headers 'x-served-by': 'cache-ord1722-ORD',
24 verbose headers 'x-cache': 'MISS',
24 verbose headers 'x-cache-hits': '0',
24 verbose headers 'x-timer': 'S1490479041.557388,VS0,VE454',
24 verbose headers vary: 'Accept-Encoding' }
25 silly get cb [ 304,
25 silly get { date: 'Sat, 25 Mar 2017 21:57:21 GMT',
25 silly get via: '1.1 varnish',
25 silly get 'cache-control': 'max-age=0',
25 silly get etag: 'W/"58d49f18-ea65"',
25 silly get age: '0',
25 silly get connection: 'keep-alive',
25 silly get 'x-served-by': 'cache-ord1722-ORD',
25 silly get 'x-cache': 'MISS',
25 silly get 'x-cache-hits': '0',
25 silly get 'x-timer': 'S1490479041.557388,VS0,VE454',
25 silly get vary: 'Accept-Encoding' } ]
26 verbose etag https://registry.npmjs.org/@angular%2fcli from cache
27 verbose get saving @angular/cli to /Users/nihy/.npm/registry.npmjs.org/_40angular_252fcli/.cache.json
28 verbose correctMkdir /Users/nihy/.npm correctMkdir not in flight; initializing
29 silly install normalizeTree
30 silly loadCurrentTree Finishing
31 silly loadIdealTree Starting
32 silly install loadIdealTree
33 silly cloneCurrentTree Starting
34 silly install cloneCurrentTreeToIdealTree
35 silly cloneCurrentTree Finishing
36 silly loadShrinkwrap Starting
37 silly install loadShrinkwrap
38 silly loadShrinkwrap Finishing
39 silly loadAllDepsIntoIdealTree Starting
40 silly install loadAllDepsIntoIdealTree
41 silly resolveWithNewModule @angular/[email protected] checking installable status
42 silly cache add args [ '@angular/cli', null ]
43 verbose cache add spec @angular/cli
44 silly cache add parsed spec Result {
44 silly cache add raw: '@angular/cli',
44 silly cache add scope: '@angular',
44 silly cache add escapedName: '@angular%2fcli',
44 silly cache add name: '@angular/cli',
44 silly cache add rawSpec: '',
44 silly cache add spec: 'latest',
44 silly cache add type: 'tag' }
45 silly addNamed @angular/cli@latest
46 verbose addNamed "latest" is being treated as a dist-tag for @angular/cli
47 info addNameTag [ '@angular/cli', 'latest' ]
48 silly mapToRegistry name @angular/cli
49 silly mapToRegistry scope (from package name) @angular
50 verbose mapToRegistry no registry URL found in name for scope @angular
51 silly mapToRegistry using default registry
52 silly mapToRegistry registry https://registry.npmjs.org/
53 silly mapToRegistry data Result {
53 silly mapToRegistry raw: '@angular/cli',
53 silly mapToRegistry scope: '@angular',
53 silly mapToRegistry escapedName: '@angular%2fcli',
53 silly mapToRegistry name: '@angular/cli',
53 silly mapToRegistry rawSpec: '',
53 silly mapToRegistry spec: 'latest',
53 silly mapToRegistry type: 'tag' }
54 silly mapToRegistry uri https://registry.npmjs.org/@angular%2fcli
55 verbose addNameTag registry:https://registry.npmjs.org/@angular%2fcli not in flight; fetching
56 verbose get https://registry.npmjs.org/@angular%2fcli not expired, no request
57 silly addNameTag next cb for @angular/cli with tag latest
58 silly addNamed @angular/[email protected]
59 verbose addNamed "1.0.0" is a plain semver version for @angular/cli
60 silly rollbackFailedOptional Starting
61 silly rollbackFailedOptional Finishing
62 silly runTopLevelLifecycles Finishing
63 silly install printInstalled
64 verbose stack Error: Invalid name: "@angular/cli"
64 verbose stack at ensureValidName (/usr/local/lib/node_modules/npm/node_modules/read-package-json/node_modules/normalize-package-data/lib/fixer.js:300:15)
64 verbose stack at Object.fixNameField (/usr/local/lib/node_modules/npm/node_modules/read-package-json/node_modules/normalize-package-data/lib/fixer.js:204:5)
64 verbose stack at /usr/local/lib/node_modules/npm/node_modules/read-package-json/node_modules/normalize-package-data/lib/normalize.js:30:38
64 verbose stack at Array.forEach (native)
64 verbose stack at normalize (/usr/local/lib/node_modules/npm/node_modules/read-package-json/node_modules/normalize-package-data/lib/normalize.js:29:15)
64 verbose stack at final (/usr/local/lib/node_modules/npm/node_modules/read-package-json/read-json.js:349:5)
64 verbose stack at then (/usr/local/lib/node_modules/npm/node_modules/read-package-json/read-json.js:124:5)
64 verbose stack at ReadFileContext.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/read-package-json/read-json.js:295:20)
64 verbose stack at ReadFileContext.callback (/usr/local/lib/node_modules/npm/node_modules/graceful-fs/graceful-fs.js:78:16)
64 verbose stack at FSReqWrap.readFileAfterOpen [as oncomplete] (fs.js:366:13)
65 verbose cwd /Users/nihy/Documents
66 error Darwin 16.4.0
67 error argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "-g" "@angular/cli"
68 error node v6.10.1
69 error npm v3.10.10
70 error Invalid name: "@angular/cli"
71 error If you need help, you may report this error at:
71 error <https://github.com/npm/npm/issues>
72 verbose exit [ 1, true ]
I followed the steps found here (https://github.com/angular/angular-cli/issues/4548) but could not get the Angular CLI to install on my laptop.
@nihy Can you try npm cache clean and then installing it make sure you don't have any old versions installed before installing latest version.
Hey @sumitarora, thanks for the help! I did the cache clean, then tried installing with sudo npm i -g @angular/cli and now "@ngtools/json-schema" appears to be the problem. I've attached the debug log here
Also, here's the full terminal readout to save you a click
lucky:~ nihy$ sudo npm cache clean
lucky:~ nihy$ sudo npm i -g @angular/cli
npm ERR! unpack Could not read data for @ngtools/[email protected]
npm ERR! unpack Could not read data for @ngtools/[email protected]
npm ERR! unpack Could not read data for @angular/[email protected]
npm ERR! Darwin 16.4.0
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "i" "-g" "@angular/cli"
npm ERR! node v6.10.1
npm ERR! npm v3.10.10
npm ERR! Invalid name: "@ngtools/json-schema"
npm ERR!
npm ERR! If you need help, you may report this error at:
npm ERR! <https://github.com/npm/npm/issues>
npm ERR! Please include the following file with any support request:
npm ERR! /Users/nihy/npm-debug.log
I was having the same issue today on Windows. I even discovered that the problem was solved when I uninstalled 64-bit node and installed the 32-bit version. I was able to get the 64-bit version working this evening, however, by updating npm to the latest version. I'm not sure why the npm version (3.10.10) shipped with the LTS version of node (6.10.1) isn't working, but this update seemed to fix it for me.
npm install npm@latest -g
Same issue on OS X 10.11.6 El Capitan with 6.10.1 LTS Node installed. Updating npm as described by @sdoyle0 above fixed it for me - I now have npm 4.4.4 installed.
Same issue here on with El Capitan. Glad i found this help! Should also be mentioned in angular documentation, quick-start guides etc.
Thanks everyone who helped! Updating to the latest version of npm solved the issue.
npm cache clean --force resolved my 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._
Most helpful comment
I was having the same issue today on Windows. I even discovered that the problem was solved when I uninstalled 64-bit node and installed the 32-bit version. I was able to get the 64-bit version working this evening, however, by updating npm to the latest version. I'm not sure why the npm version (3.10.10) shipped with the LTS version of node (6.10.1) isn't working, but this update seemed to fix it for me.
npm install npm@latest -g