我正在尝试在我的MAC上安装Mjml电子邮件营销框架,但我一直收到下面的错误
在此处输入代码
MacBook-Air:// desina$ npm init -y && npm install mjml
npm ERR! path /package.json
npm ERR! code EACCES
npm ERR! errno -13
npm ERR! syscall open
npm ERR! Error: EACCES: permission denied, open '/package.json'
npm ERR! { [Error: EACCES: permission denied, open '/package.json']
npm ERR! stack: 'Error: EACCES: permission denied, open \'/package.json\'',
npm ERR! errno: -13,
npm ERR! code: 'EACCES',
npm ERR! syscall: 'open',
npm ERR! path: '/package.json' }
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 (though this is not recommended).
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/desina/.发布于 2019-01-22 18:37:56
这里的问题是,您不是计算机的管理员,因此会出现与权限相关的错误。请求管理员授予您权限。
另一种方法是使用sudo运行这些命令。
发布于 2019-03-12 19:03:00
您是否安装了node js,是否拥有安装所需的管理员权限?我发现在MJML中工作的更简单的方法是安装应用程序,因为它预装了应用程序和语言。
https://stackoverflow.com/questions/54283108
复制相似问题