npm install @wepy/cli -g 报错的解决措施
npm install @wepy/cli -g 报错:
Error: EACCES: permission denied, access ‘/usr/lib/node_modules/@wepy/cli’
vagrant@homestead:~/Code/larabbs$ npm install @wepy/cli -g
npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated request@2.88.0: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated coffee-script@1.12.7: CoffeeScript on NPM has moved to "coffeescript" (no hyphen)
npm WARN deprecated smartwrap@1.2.5: Backported compatibility to node > 6
npm WARN checkPermissions Missing write access to /usr/lib/node_modules/@wepy/cli
npm WARN checkPermissions Missing write access to /usr/lib/node_modules/@wepy/cli/node_modules
npm WARN checkPermissions Missing write access to /usr/lib/node_modules/@wepy
npm ERR! code EACCES
npm ERR! syscall access
npm ERR! path /usr/lib/node_modules/@wepy/cli
npm ERR! errno -13
npm ERR! Error: EACCES: permission denied, access '/usr/lib/node_modules/@wepy/cli'
npm ERR! [Error: EACCES: permission denied, access '/usr/lib/node_modules/@wepy/cli'] {
npm ERR! stack: "Error: EACCES: permission denied, access '/usr/lib/node_modules/@wepy/cli'",
npm ERR! errno: -13,
npm ERR! code: 'EACCES',
npm ERR! syscall: 'access',
npm ERR! path: '/usr/lib/node_modules/@wepy/cli'
npm ERR! }
npm ERR!
npm ERR! The operation was rejected by your operating system.
npm ERR! It is likely you do not have the permissions to access this file as the current user
npm ERR!
npm ERR! If you believe this might be a permissions issue, please double-check the
npm ERR! permissions of the file and its containing directories, or try running
npm ERR! the command again as root/Administrator.
npm ERR! A complete log of this run can be found in:
npm ERR! /home/vagrant/.npm/_logs/2020-07-20T09_04_17_257Z-debug.log
解决措施:
$ sudo npm install @wepy/cli -g –unsafe-perm=true –allow-root
vagrant@homestead:~/Code/larabbs$ sudo npm install @wepy/cli -g --unsafe-perm=true --allow-root
npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated request@2.88.0: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated coffee-script@1.12.7: CoffeeScript on NPM has moved to "coffeescript" (no hyphen)
npm WARN deprecated smartwrap@1.2.5: Backported compatibility to node > 6
/usr/bin/wepy -> /usr/lib/node_modules/@wepy/cli/bin/wepy.js
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@2.1.3 (node_modules/@wepy/cli/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.1.3: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
+ @wepy/cli@2.1.0
updated 1 package in 36.674s
推荐文章: