Closed
Description
- Version: v11.0.0-pre
- Platform: Linux bf7762b084bb 4.9.87-linuxkit-aufs deps: update openssl to 1.0.1j #1 SMP Wed Mar 14 15:12:16 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
- Subsystem: fs
When I run the below code on Ubuntu 18.04 on Docker, I got the error.
Expected behavior was Error [ERR_METHOD_NOT_IMPLEMENTED]
but I got AssertionError [ERR_ASSERTION]
.
const fs = require('fs');
const { lchmod } = fs.promises;
(async () => {
try {
await lchmod('./test.txt', 0o777);
} catch (err) {
console.log(err);
}
})();
{ AssertionError [ERR_ASSERTION]: Code: ERR_METHOD_NOT_IMPLEMENTED; The provided arguments length (0) does not match the required ones (1).
at getMessage (internal/errors.js:223:3)
at new NodeError (internal/errors.js:156:13)
at lchmod (internal/fs/promises.js:373:11)
at repl:3:10
at repl:7:3
at Script.runInThisContext (vm.js:89:20)
at REPLServer.defaultEval (repl.js:317:29)
at bound (domain.js:396:14)
at REPLServer.runBound [as eval] (domain.js:409:12)
at REPLServer.onLine (repl.js:615:10)
generatedMessage: false,
name: 'AssertionError [ERR_ASSERTION]',
code: 'ERR_ASSERTION',
actual: false,
expected: true,
operator: '==' }
Does ERR_METHOD_NOT_IMPLEMENTED()
require arguments like ERR_METHOD_NOT_IMPLEMENTED('lchmod()')
?
https://github.com/nodejs/node/blob/master/lib/internal/fs/promises.js#L373
https://github.com/nodejs/node/blob/master/lib/internal/fs/promises.js#L381