无法安装NPM应用程序 - Mac

时间:2016-08-03 16:58:23

标签: node.js

所以我正在尝试安装Express Application Generator for Express。它继续失败,并表示访问被拒绝。之前其他应用已经发生这种情况。我注意到我可以安装一些像express这样的npm模块,但不能像Application Generator那样安装其他模块。

以下是错误报告:

    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   'express-generator',
1 verbose cli   '-g' ]
2 info using npm@2.15.8
3 info using node@v4.4.7
4 verbose install initial load of /usr/local/lib/package.json
5 verbose readDependencies loading dependencies from /usr/local/lib/package.json
6 silly cache add args [ 'express-generator', null ]
7 verbose cache add spec express-generator
8 silly cache add parsed spec Result {
8 silly cache add   raw: 'express-generator',
8 silly cache add   scope: null,
8 silly cache add   name: 'express-generator',
8 silly cache add   rawSpec: '',
8 silly cache add   spec: 'latest',
8 silly cache add   type: 'tag' }
9 silly addNamed express-generator@latest
10 verbose addNamed "latest" is being treated as a dist-tag for express-generator
11 info addNameTag [ 'express-generator', 'latest' ]
12 silly mapToRegistry name express-generator
13 silly mapToRegistry using default registry
14 silly mapToRegistry registry https://registry.npmjs.org/
15 silly mapToRegistry data Result {
15 silly mapToRegistry   raw: 'express-generator',
15 silly mapToRegistry   scope: null,
15 silly mapToRegistry   name: 'express-generator',
15 silly mapToRegistry   rawSpec: '',
15 silly mapToRegistry   spec: 'latest',
15 silly mapToRegistry   type: 'tag' }
16 silly mapToRegistry uri https://registry.npmjs.org/express-generator
17 verbose addNameTag registry:https://registry.npmjs.org/express-generator not in flight; fetching
18 verbose request uri https://registry.npmjs.org/express-generator
19 verbose request no auth needed
20 info attempt registry request try #1 at 12:52:28 PM
21 verbose request id 4949452f6f27259c
22 verbose etag "8A1N6JIYFXC8B1D30NIZQQ2EO"
23 http request GET https://registry.npmjs.org/express-generator
24 http 304 https://registry.npmjs.org/express-generator
25 verbose headers { date: 'Wed, 03 Aug 2016 16:52:28 GMT',
25 verbose headers   via: '1.1 varnish',
25 verbose headers   'cache-control': 'max-age=300',
25 verbose headers   etag: '"8A1N6JIYFXC8B1D30NIZQQ2EO"',
25 verbose headers   age: '95',
25 verbose headers   connection: 'keep-alive',
25 verbose headers   'x-served-by': 'cache-jfk1043-JFK',
25 verbose headers   'x-cache': 'HIT',
25 verbose headers   'x-cache-hits': '1',
25 verbose headers   'x-timer': 'S1470243148.471897,VS0,VE0',
25 verbose headers   vary: 'Accept-Encoding' }
26 silly get cb [ 304,
26 silly get   { date: 'Wed, 03 Aug 2016 16:52:28 GMT',
26 silly get     via: '1.1 varnish',
26 silly get     'cache-control': 'max-age=300',
26 silly get     etag: '"8A1N6JIYFXC8B1D30NIZQQ2EO"',
26 silly get     age: '95',
26 silly get     connection: 'keep-alive',
26 silly get     'x-served-by': 'cache-jfk1043-JFK',
26 silly get     'x-cache': 'HIT',
26 silly get     'x-cache-hits': '1',
26 silly get     'x-timer': 'S1470243148.471897,VS0,VE0',
26 silly get     vary: 'Accept-Encoding' } ]
27 verbose etag https://registry.npmjs.org/express-generator from cache
28 verbose get saving express-generator to /Users/tinocaer/.npm/registry.npmjs.org/express-generator/.cache.json
29 verbose correctMkdir /Users/tinocaer/.npm correctMkdir not in flight; initializing
30 silly addNameTag next cb for express-generator with tag latest
31 silly addNamed express-generator@4.13.4
32 verbose addNamed "4.13.4" is a plain semver version for express-generator
33 silly cache afterAdd express-generator@4.13.4
34 verbose afterAdd /Users/tinocaer/.npm/express-generator/4.13.4/package/package.json not in flight; writing
35 verbose correctMkdir /Users/tinocaer/.npm correctMkdir not in flight; initializing
36 verbose afterAdd /Users/tinocaer/.npm/express-generator/4.13.4/package/package.json written
37 silly install resolved [ { name: 'express-generator',
37 silly install resolved     description: 'Express\' application generator',
37 silly install resolved     version: '4.13.4',
37 silly install resolved     author: { name: 'TJ Holowaychuk', email: 'tj@vision-media.ca' },
37 silly install resolved     contributors: [ [Object], [Object], [Object], [Object], [Object], [Object] ],
37 silly install resolved     keywords:
37 silly install resolved      [ 'express',
37 silly install resolved        'framework',
37 silly install resolved        'sinatra',
37 silly install resolved        'web',
37 silly install resolved        'rest',
37 silly install resolved        'restful',
37 silly install resolved        'router',
37 silly install resolved        'app',
37 silly install resolved        'api' ],
37 silly install resolved     repository:
37 silly install resolved      { type: 'git',
37 silly install resolved        url: 'git+https://github.com/expressjs/generator.git' },
37 silly install resolved     license: 'MIT',
37 silly install resolved     dependencies: { commander: '2.7.1', mkdirp: '0.5.1', 'sorted-object': '2.0.0' },
37 silly install resolved     main: 'bin/express',
37 silly install resolved     preferGlobal: true,
37 silly install resolved     bin: { express: './bin/express' },
37 silly install resolved     devDependencies: { mocha: '2.4.5', rimraf: '2.5.2', supertest: '1.2.0' },
37 silly install resolved     engines: { node: '>= 0.10' },
37 silly install resolved     files: [ 'LICENSE', 'bin/', 'templates/' ],
37 silly install resolved     scripts:
37 silly install resolved      { test: 'mocha --reporter spec --bail --check-leaks test/',
37 silly install resolved        'test-ci': 'mocha --reporter spec --check-leaks test/' },
37 silly install resolved     gitHead: 'f7b1543a297425f541f0b18c3312105c403a660f',
37 silly install resolved     bugs: { url: 'https://github.com/expressjs/generator/issues' },
37 silly install resolved     homepage: 'https://github.com/expressjs/generator',
37 silly install resolved     _id: 'express-generator@4.13.4',
37 silly install resolved     _shasum: '3abec2e5e7b548820075024954ff7fa6a447e5eb',
37 silly install resolved     _from: 'express-generator@latest',
37 silly install resolved     _npmVersion: '1.4.28',
37 silly install resolved     _npmUser: { name: 'dougwilson', email: 'doug@somethingdoug.com' },
37 silly install resolved     maintainers: [ [Object] ],
37 silly install resolved     dist:
37 silly install resolved      { shasum: '3abec2e5e7b548820075024954ff7fa6a447e5eb',
37 silly install resolved        tarball: 'https://registry.npmjs.org/express-generator/-/express-generator-4.13.4.tgz' },
37 silly install resolved     _npmOperationalInternal:
37 silly install resolved      { host: 'packages-16-east.internal.npmjs.com',
37 silly install resolved        tmp: 'tmp/express-generator-4.13.4.tgz_1466223574112_0.6206904440186918' },
37 silly install resolved     directories: {},
37 silly install resolved     _resolved: 'https://registry.npmjs.org/express-generator/-/express-generator-4.13.4.tgz',
37 silly install resolved     readme: 'ERROR: No README data found!' } ]
38 info install express-generator@4.13.4 into /usr/local/lib
39 info installOne express-generator@4.13.4
40 verbose installOne of express-generator to /usr/local/lib not in flight; installing
41 verbose correctMkdir /Users/tinocaer/.npm/_locks correctMkdir not in flight; initializing
42 verbose lock using /Users/tinocaer/.npm/_locks/express-generator-d3cc1706f4adef09.lock for /usr/local/lib/node_modules/express-generator
43 silly install write writing express-generator 4.13.4 to /usr/local/lib/node_modules/express-generator
44 verbose unbuild lib/node_modules/express-generator
45 silly gentlyRm /usr/local/lib/node_modules/express-generator is being purged from base /usr/local
46 verbose gentlyRm don't care about contents; nuking /usr/local/lib/node_modules/express-generator
47 verbose tar unpack /Users/tinocaer/.npm/express-generator/4.13.4/package.tgz
48 verbose tar unpacking to /usr/local/lib/node_modules/express-generator
49 silly gentlyRm /usr/local/lib/node_modules/express-generator is being purged
50 verbose gentlyRm don't care about contents; nuking /usr/local/lib/node_modules/express-generator
51 silly gunzTarPerm modes [ '755', '644' ]
52 error tar.unpack untar error /Users/tinocaer/.npm/express-generator/4.13.4/package.tgz
53 verbose unlock done using /Users/tinocaer/.npm/_locks/express-generator-d3cc1706f4adef09.lock for /usr/local/lib/node_modules/express-generator
54 verbose fstream_path /usr/local/lib/node_modules/express-generator
55 verbose fstream_type Directory
56 verbose fstream_class DirWriter
57 verbose stack Error: EACCES: permission denied, mkdir '/usr/local/lib/node_modules/express-generator'
57 verbose stack     at Error (native)
58 verbose fstream_stack /usr/local/lib/node_modules/npm/node_modules/fstream/lib/dir-writer.js:35:25
58 verbose fstream_stack /usr/local/lib/node_modules/npm/node_modules/mkdirp/index.js:47:53
58 verbose fstream_stack FSReqWrap.oncomplete (fs.js:82:15)
59 verbose cwd /Users/tinocaer
60 error Darwin 15.6.0
61 error argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "express-generator" "-g"
62 error node v4.4.7
63 error npm  v2.15.8
64 error path /usr/local/lib/node_modules/express-generator
65 error code EACCES
66 error errno -13
67 error syscall mkdir
68 error Error: EACCES: permission denied, mkdir '/usr/local/lib/node_modules/express-generator'
68 error     at Error (native)
68 error  { [Error: EACCES: permission denied, mkdir '/usr/local/lib/node_modules/express-generator']
68 error   errno: -13,
68 error   code: 'EACCES',
68 error   syscall: 'mkdir',
68 error   path: '/usr/local/lib/node_modules/express-generator',
68 error   fstream_type: 'Directory',
68 error   fstream_path: '/usr/local/lib/node_modules/express-generator',
68 error   fstream_class: 'DirWriter',
68 error   fstream_stack:
68 error    [ '/usr/local/lib/node_modules/npm/node_modules/fstream/lib/dir-writer.js:35:25',
68 error      '/usr/local/lib/node_modules/npm/node_modules/mkdirp/index.js:47:53',
68 error      'FSReqWrap.oncomplete (fs.js:82:15)' ] }
69 error Please try running this command again as root/Administrator.
70 verbose exit [ -13, true ]
71 verbose unbuild lib/node_modules/express-generator
72 silly gentlyRm /usr/local/lib/node_modules/express-generator is being purged from base /usr/local
73 verbose gentlyRm don't care about contents; nuking /usr/local/lib/node_modules/express-generator

感谢您的帮助。

0 个答案:

没有答案