我完全是反应JS的初学者。在使用这个命令安装了一个名为‘npm install --save-dev tachyons@4.10.0’的包之后,我将继续得到这个错误,同时在react项目中使用这个命令启动npm。但问题是,在安装软件包之前,它运行得很好。我不知道出了什么问题。希望有人能帮我。谢谢。
npm WARN deprecated circular-json@0.3.3: CircularJSON is in maintenance only, flatted is its successor.
npm WARN deprecated kleur@2.0.2: Please upgrade to kleur@3 or migrate to 'ansi-colors' if you prefer the old syntax. Visit <https://github.com/lukeed/kleur/releases/tag/v3.0.0\> for migration path(s).
npm WARN rollback Rolling back @types/node@11.9.5 failed (this is probably harmless): EPERM: operation not permitted, lstat 'C:\Users\User\Desktop\robofriends\node_modules\@types\node'
npm WARN ts-pnp@1.0.1 requires a peer of typescript@* but none is installed. You must install peer dependencies yourself.
npm ERR! path C:\Users\User\Desktop\robofriends\node_modules\@types
npm ERR! code EPERM
npm ERR! errno -4048
npm ERR! syscall mkdir
npm ERR! Error: EPERM: operation not permitted, mkdir 'C:\Users\User\Desktop\robofriends\node_modules\@types'
npm ERR! { [Error: EPERM: operation not permitted, mkdir 'C:\Users\User\Desktop\robofriends\node_modules\@types']
npm ERR! cause:
npm ERR! { Error: EPERM: operation not permitted, mkdir 'C:\Users\User\Desktop\robofriends\node_modules\@types'
npm ERR! errno: -4048,
npm ERR! code: 'EPERM',
npm ERR! syscall: 'mkdir',
npm ERR! path:
npm ERR! 'C:\\Users\\User\\Desktop\\robofriends\\node_modules\\@types' },
npm ERR! stack:
npm ERR! "Error: EPERM: operation not permitted, mkdir 'C:\\Users\\User\\Desktop\\robofriends\\node_modules\\@types'",
npm ERR! errno: -4048,
npm ERR! code: 'EPERM',
npm ERR! syscall: 'mkdir',
npm ERR! path:
npm ERR! 'C:\\Users\\User\\Desktop\\robofriends\\node_modules\\@types',
npm ERR! parent: 'robofriends' }
npm ERR!
npm ERR! The operation was rejected by your operating system.
npm ERR! It's possible that the file was already in use (by a text editor or antivirus),
npm ERR! or that you lack permissions to access it.
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! C:\Users\User\AppData\Roaming\npm-cache\_logs\2019-02-24T22_26_47_036Z-debug.log发布于 2019-02-24 23:00:39
您所拥有的日志实际上非常清楚您收到错误的可能原因。
您的操作系统拒绝了该操作。npm错误!可能该文件已经在使用(由文本编辑器或防病毒),npm错误!或者您没有访问它的权限。
你还有另一个候机楼开着吗?
如果您认为这可能是一个权限问题,请再次检查npm错误!文件及其包含目录的权限,或者尝试运行npm!该命令再次作为root/Administrator (虽然不建议这样做)。
以管理员身份运行命令提示符。
除上述内容外,日志的前4行将向您发出警告,您应该始终避免使用未积极维护的包或包的旧版本。
https://stackoverflow.com/questions/54857269
复制相似问题