我无法在 linux mint 上使用 npm 安装 web3。我尝试了“npm --save install web3”并尝试重新安装,但是像以前一样发生错误。
npm 错误如下:
$ npm --save install web3
npm WARN checkPermissions Missing write access to /home/taylorec/node_modules
npm WARN checkPermissions Missing write access to /home/taylorec/node_modules/web3-providers-ws/node_modules
npm WARN enoent ENOENT: no such file or directory, open '/home/taylorec/package.json'
npm WARN taylorec No description
npm WARN taylorec No repository field.
npm WARN taylorec No README data
npm WARN taylorec No license field.
npm ERR! path /home/taylorec/node_modules
npm ERR! code EACCES
npm ERR! errno -13
npm ERR! syscall access
npm ERR! Error: EACCES: permission denied, access '/home/taylorec/node_modules'
npm ERR! { Error: EACCES: permission denied, access '/home/taylorec/node_modules'
npm ERR! stack: 'Error: EACCES: permission denied, access \'/home/taylorec/node_modules\'',
npm ERR! errno: -13,
npm ERR! code: 'EACCES',
npm ERR! syscall: 'access',
npm ERR! path: '/home/taylorec/node_modules' }
npm ERR!
npm ERR! Please try running this command again as root/Administrator.
npm ERR! A complete log of this run can be found in:
npm ERR! /home/taylorec/.npm/_logs/2018-01-29T14_59_11_864Z-debug.log