sail npm install 出现无权限的报错?operation not permitted

1). 当前使用的 Laravel 版本?

10.8.0

2). 当前使用的 php/php-fpm 版本?

PHP 版本:8.2.5

3). 当前系统

windows 11 wsl2 docker vscode

问题描述

运行 ./vendor/bin/sail npm i 后报错

npm ERR! code EPERM
npm ERR! syscall chmod
npm ERR! path /var/www/html/node_modules/esbuild/bin/esbuild
npm ERR! errno -1
npm ERR! Error: EPERM: operation not permitted, chmod ‘/var/www/html/node_modules/esbuild/bin/esbuild’
npm ERR! [Error: EPERM: operation not permitted, chmod ‘/var/www/html/node_modules/esbuild/bin/esbuild’] {
npm ERR! errno: -1,
npm ERR! code: ‘EPERM’,
npm ERR! syscall: ‘chmod’,
npm ERR! path: ‘/var/www/html/node_modules/esbuild/bin/esbuild’
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: /home/sail/.npm/_logs/2023-04-22T12_47_40_915Z-debug-0.log

《L04 微信小程序从零到发布》
从小程序个人账户申请开始,带你一步步进行开发一个微信小程序,直到提交微信控制台上线发布。
《L02 从零构建论坛系统》
以构建论坛项目 LaraBBS 为线索,展开对 Laravel 框架的全面学习。应用程序架构思路贴近 Laravel 框架的设计哲学。
讨论数量: 0
(= ̄ω ̄=)··· 暂无内容!

讨论应以学习和精进为目的。请勿发布不友善或者负能量的内容,与人为善,比聪明更重要!