Error: EPERM: operation not permitted, open ‘D:\Users\whh\Desktop\my-next-2\.next\trace‘

 报错某个文件打不开,有可能是文件权限不足。报错如下

D:\Users\whh\Desktop\my-next-2>yarn build
yarn run v1.22.19
$ next build
uncaughtException [Error: EPERM: operation not permitted, open 'D:\Users\whh\Desktop\my-next-2\.next\trace'] {
  errno: -4048,
  code: 'EPERM',
  syscall: 'open',
  path: 'D:\\Users\\whh\\Desktop\\my-next-2\\.next\\trace'
}
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

解决办法赋予权限

Error: EPERM: operation not permitted, open ‘D:\Users\whh\Desktop\my-next-2\.next\trace‘_第1张图片

Error: EPERM: operation not permitted, open ‘D:\Users\whh\Desktop\my-next-2\.next\trace‘_第2张图片

给当前登录的用户完全控制就好 

你可能感兴趣的:(前端,数据库,linux)