EPERM:不允许操作, UnhandledPromiseRejectionWarning: Error:
运行node index.js,从另一个文件引入读写模块fs.writeFile和fs.readFile出现了这个问题:
(node:6676) UnhandledPromiseRejectionWarning: Error: EPERM: operation not permitted, read
(Use node --trace-warnings ...
to show where the warning was created)
(node:6676) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block,
or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections
=strict` (see https://nodejs.org/api/cli.ht... (rejection id: 1)
(node:6676) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.
js process with a non-zero exit code.
然后我设置了文件夹的权限是
但还是报上面的错,请问大神是啥原因呢?
以上是 EPERM:不允许操作, UnhandledPromiseRejectionWarning: Error: 的全部内容, 来源链接: utcz.com/p/935537.html