0

我正在尝试在我的 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/.
4

2 回答 2

0

这里的问题是您不是计算机上的管理员,因此会出现与权限相关的错误。请管理员授予您权限。

另一种方法是使用sudo.

于 2019-01-22T10:37:55.957 回答
0

您是否安装了 node js 并且您是否具有安装的管理员权限?我发现在 MJML 中工作更简单的方法是安装应用程序,因为它预装了应用程序和语言。

于 2019-03-12T11:02:59.500 回答