【发布时间】:2021-12-22 21:15:03
【问题描述】:
我似乎无法解决这个问题... 我已经尝试完全卸载节点并重新安装,清理 npm 缓存,重新安装包(Angular CLI),运行 sudo chown -R franfonse ../Programming ,但这个问题一直在发生。
我尝试运行 ng new my-app 以使用 Angular CLI 创建一个新项目,这就是我不断得到的结果:
npm ERR! syscall mkdir
npm ERR! path /Users/franfonse/Desktop/Programming/my-app/node_modules
npm ERR! errno -1
npm ERR! Error: EPERM: operation not permitted, mkdir '/Users/franfonse/Desktop/Programming/my-app/node_modules'
npm ERR! [Error: EPERM: operation not permitted, mkdir '/Users/franfonse/Desktop/Programming/my-app/node_modules'] {
npm ERR! errno: -1,
npm ERR! code: 'EPERM',
npm ERR! syscall: 'mkdir',
npm ERR! path: '/Users/franfonse/Desktop/Programming/my-app/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/franfonse/.npm/_logs/2021-11-10T08_54_24_926Z-debug.log
✖ Package install failed, see above.
The Schematic workflow failed. See above.
有人知道如何解决这个问题吗?
非常感谢。
【问题讨论】:
标签: node.js angular npm angular-cli node-modules