简体   繁体   中英

Node.js Express install No README data

I am totally brandnew to node.js and trying to install the express framework, not very sure why when i install Express by

$ npm express install --save

it gives me this package.json test@1.0.0 No README data then lots of ERR!

Thanks

Debug log

0 info it worked if it ends with ok
1 verbose cli [ 'node', '/usr/local/bin/npm', 'install', 'express', '--save' ]
2 info using npm@2.7.4
3 info using node@v0.12.2
4 warn package.json test@1.0.0 No README data
5 silly cache add args [ 'express', null ]
6 verbose cache add spec express
7 silly cache add parsed spec { raw: 'express',
7 silly cache add   scope: null,
7 silly cache add   name: 'express',
7 silly cache add   rawSpec: '',
7 silly cache add   spec: '*',
7 silly cache add   type: 'range' }
8 verbose addNamed express@*
9 silly addNamed semver.valid null
10 silly addNamed semver.validRange *
11 silly addNameRange { name: 'express', range: '*', hasData: false }
12 silly mapToRegistry name express
13 silly mapToRegistry using default registry
14 silly mapToRegistry registry https://registry.npmjs.org/
15 silly mapToRegistry uri https://registry.npmjs.org/express
16 verbose addNameRange registry:https://registry.npmjs.org/express not in flight; fetching
17 verbose request uri https://registry.npmjs.org/express
18 verbose request no auth needed
19 info attempt registry request try #1 at 3:02:08 PM
20 verbose request id 42abc9c7545a84ee
21 verbose etag "5QPC4D9F40JTXPEZQJQJ5L09D"
22 http request GET https://registry.npmjs.org/express
23 http 304 https://registry.npmjs.org/express
24 silly get cb [ 304,
24 silly get   { date: 'Sat, 09 May 2015 07:02:18 GMT',
24 silly get     via: '1.1 varnish',
24 silly get     'cache-control': 'max-age=60',
24 silly get     etag: '"5QPC4D9F40JTXPEZQJQJ5L09D"',
24 silly get     age: '36',
24 silly get     connection: 'keep-alive',
24 silly get     'x-served-by': 'cache-hkg6823-HKG',
24 silly get     'x-cache': 'HIT',
24 silly get     'x-cache-hits': '1',
24 silly get     'x-timer': 'S1431154938.074288,VS0,VE2',
24 silly get     vary: 'Accept' } ]
25 verbose etag https://registry.npmjs.org/express from cache
26 verbose get saving express to /Users/clarkho/.npm/registry.npmjs.org/express/.cache.json

Log from Terminal

npm WARN package.json test@1.0.0 No README data
npm ERR! Darwin 12.5.0
npm ERR! argv "node" "/usr/local/bin/npm" "install" "express" "--save"
npm ERR! node v0.12.2
npm ERR! npm  v2.7.4
npm ERR! path /Users/clarkho/.npm/debug/2.1.3
npm ERR! code EACCES
npm ERR! errno -13

npm ERR! Error: EACCES, mkdir '/Users/clarkho/.npm/debug/2.1.3'
npm ERR!     at Error (native)
npm ERR!  { [Error: EACCES, mkdir '/Users/clarkho/.npm/debug/2.1.3']
npm ERR!   errno: -13,
npm ERR!   code: 'EACCES',
npm ERR!   path: '/Users/clarkho/.npm/debug/2.1.3',
npm ERR!   parent: 'express' }
npm ERR! 
npm ERR! Please try running this command again as root/Administrator.

npm ERR! Please include the following file with any support request:
npm ERR!     /Users/clarkho/Localhost/nodeapp/npm-debug.log

Log from terminal reports, that npm don't have rights for directory /Users/clarkho/.npm/debug/2.1.3 from currently user. You can either change permission:

sudo chown -R $(whoami) /Users/clarkho/.npm/debug/2.1.3

or run npm with sudo

sudo npm install express --save

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM