Caseys-MacBook-Pro:~ casey$ npm install -g topojson
npm http GET https://registry.npmjs.org/topojson
npm http 200 https://registry.npmjs.org/topojson
npm http GET https://registry.npmjs.org/topojson/-/topojson-1.1.4.tgz
npm http 200 https://registry.npmjs.org/topojson/-/topojson-1.1.4.tgz
npm 错误!错误:EACCES,mkdir '/usr/local/lib/node_modules/topojson'
npm 错误!{ [错误:EACCES,mkdir '/usr/local/lib/node_modules/topojson']
npm 错误!错误号:3,
npm 错误!代码:'EACCES',
npm 错误!路径:'/usr/local/lib/node_modules/topojson',
npm 错误!fstream_type: '目录',
npm 错误!fstream_path: '/usr/local/lib/node_modules/topojson',
npm 错误!fstream_class: 'DirWriter',
npm 错误!fstream_stack:
npm 错误!['/usr/local/lib/node_modules/npm/node_modules/fstream/lib/dir-writer.js:36:23',
npm 错误!'/usr/local/lib/node_modules/npm/node_modules/mkdirp/index.js:37:53',
npm 错误!'Object.oncomplete (fs.js:107:15)' ] }
npm 错误!
npm 错误!请尝试以 root/管理员身份再次运行此命令。
npm 错误!系统达尔文 12.4.0
npm 错误!命令“节点”“/usr/local/bin/npm”“安装”“-g”“topojson”
npm 错误!cwd /用户/casey
npm 错误!节点-v v0.10.11
npm 错误!npm -v 1.2.30
npm 错误!路径 /usr/local/lib/node_modules/topojson
npm 错误!fstream_path /usr/local/lib/node_modules/topojson
npm 错误!fstream_type 目录
npm 错误!fstream_class DirWriter
npm 错误!代码 EACCES
npm 错误!错误号 3
npm 错误!堆栈错误:EACCES,mkdir '/usr/local/lib/node_modules/topojson'
npm 错误!fstream_stack /usr/local/lib/node_modules/npm/node_modules/fstream/lib/dir-writer.js:36:23
npm 错误!fstream_stack /usr/local/lib/node_modules/npm/node_modules/mkdirp/index.js:37:53
npm 错误!fstream_stack Object.oncomplete (fs.js:107:15)
npm 错误!
npm 错误!可以在以下位置找到其他日志记录详细信息:
npm 错误!/Users/casey/npm-debug.log
npm 错误!不好的代码 0
我不知道该怎么做或如何解决这个问题。