我正在尝试运行 npm install,但它无法正常工作。当我运行该命令时,它会获取所有 npm 包。然而,当它开始清理时,它给了我以下错误:
3242 timing build:link Completed in 222ms
3243 info run [email protected] install node_modules/deasync node ./build.js
3244 info run [email protected] install node_modules/yorkie node bin/install.js
3245 info run [email protected] install { code: 0, signal: null }
3246 timing build:run:install:node_modules/yorkie Completed in 235ms
3247 info run [email protected] install { code: 1, signal: null }
3248 warn cleanup Failed to remove some directories [
3248 warn cleanup [
3248 warn cleanup 'D:\\Repos\\XX\\frontend\\legacy\\node_modules\\@storybook\\addon-essentials',
3248 warn cleanup [Error: EPERM: operation not permitted, rmdir 'D:\Repos\XX\frontend\legacy\node_modules\@storybook\addon-essentials\node_modules\@storybook\addon-docs\dist\modern'] {
3248 warn cleanup errno: -4048,
3248 warn cleanup code: 'EPERM',
3248 warn cleanup syscall: 'rmdir',
3248 warn cleanup path: 'D:\\Repos\\XX\\frontend\\legacy\\node_modules\\@storybook\\addon-essentials\\node_modules\\@storybook\\addon-docs\\dist\\modern'
3248 warn cleanup }
3248 warn cleanup ],
3248 warn cleanup [
3248 warn cleanup 'D:\\Repos\\XX\\frontend\\legacy\\node_modules\\@storybook',
3248 warn cleanup [Error: EPERM: operation not permitted, rmdir 'D:\Repos\XX\frontend\legacy\node_modules\@storybook\addon-essentials'] {
3248 warn cleanup errno: -4048,
3248 warn cleanup code: 'EPERM',
3248 warn cleanup syscall: 'rmdir',
3248 warn cleanup path: 'D:\\Repos\\XX\\frontend\\legacy\\node_modules\\@storybook\\addon-essentials'
3248 warn cleanup }
3248 warn cleanup ]
3248 warn cleanup ]
对我来说,它似乎没有删除某些文件夹的权限,但我不知道如何解决这个问题。我确保运行 npm install 时没有任何东西在运行,甚至尝试在管理员模式下运行 npm install。
这可能是什么原因造成的?
我使用的是节点 v20.8.0
“npm 缓存清除 --force”在我的案例中有效