npm 版本6.14.11 安装mpxjs报错

来源:1-2 开始

慕妹9424852

2021-03-02 11:02

npm WARN deprecated request@2.88.2: 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 har-validator@5.1.5: this library is no longer supported

npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules

npm ERR! code EACCES

npm ERR! syscall access

npm ERR! path /usr/local/lib/node_modules

npm ERR! errno -13

npm ERR! Error: EACCES: permission denied, access '/usr/local/lib/node_modules'

npm ERR!  [Error: EACCES: permission denied, access '/usr/local/lib/node_modules'] {

npm ERR!   errno: -13,

npm ERR!   code: 'EACCES',

npm ERR!   syscall: 'access',

npm ERR!   path: '/usr/local/lib/node_modules'

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!     /Users/tcy/.npm/_logs/2021-03-02T02_59_01_878Z-debug.log


写回答 关注

1回答

  • Amy_sh
    2021-03-17 16:32:30

    你这是没有/usr/local/lib/node_modules目录的访问权限,是mac环境吧,用sudo去安装就可以了

零基础入门 mpx 小程序框架

增强型小程序框架Mpx使用入门教程

11726 学习 · 21 问题

查看课程

相似问题