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
推荐文章: