我刚刚买了一台新的Mac笔记本电脑。说实话,我对Mac操作系统不是很熟悉。现在我遇到了一个问题,无法运行npm install。我尝试通过运行这个命令来解决这个问题,参考了这篇文章:在OSX中安装npm模块时出现权限被拒绝。我已经进入了下一步。现在错误出现在项目文件夹中。基本上,它没有权限访问桌面上的项目文件夹中的node_modules。当我再次运行npm install时,我得到了这个错误。原始答案:最初的回答。
我已经更新了npm文件夹的权限。除此之外,我还需要做些什么来解决这个错误?翻译成中文为:
npm ERR! path /Users/wai/Desktop/easy-eat-backend-laravel/node_modules/@coreui/coreui/node_modules
npm ERR! code EACCES
npm ERR! errno -13
npm ERR! syscall access
npm ERR! Error: EACCES: permission denied, access '/Users/wai/Desktop/easy-eat-backend-laravel/node_modules/@coreui/coreui/node_modules'
npm ERR! { [Error: EACCES: permission denied, access '/Users/wai/Desktop/easy-eat-backend-laravel/node_modules/@coreui/coreui/node_modules']
npm ERR! stack:
npm ERR! 'Error: EACCES: permission denied, access \'/Users/wai/Desktop/easy-eat-backend-laravel/node_modules/@coreui/coreui/node_modules\'',
npm ERR! errno: -13,
npm ERR! code: 'EACCES',
npm ERR! syscall: 'access',
npm ERR! path:
npm ERR! '/Users/wai/Desktop/easy-eat-backend-laravel/node_modules/@coreui/coreui/node_modules' }
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文件夹的权限。除此之外,我还需要做些什么来解决这个错误?翻译成中文为:
我已经更新了npm文件夹的权限。除此之外,我还需要做些什么来解决这个错误?