Closed
Description
- Version: 14.6.0
- Platform: Linux rpatrick-1 4.14.35-2025.404.1.2.el7uek.x86_64 test: don't remove empty.txt on win32 #2 SMP Wed Jan 27 20:30:12 PST 2021 x86_64 x86_64 x86_64 GNU/Linux
- Subsystem:fs
What steps will reproduce the bug?
- On MacOS or Windows, do the following:
- git clone https://github.com/rpatrick00/promises-rm-bug.git
- cd promises-rm-bug
- node index.js
- See that the program runs and the file is removed
- On Linux, do the same steps and see the error.
[rpatrick@rpatrick-1 promises-rm-bug]$ node index.js deleteMe.txt
Attempting to delete deleteMe.txt
TypeError: fsPromises.rm is not a function
at /scratch/rpatrick/promises-rm-bug/index.js:12:16
at new Promise (<anonymous>)
at main (/scratch/rpatrick/promises-rm-bug/index.js:11:10)
at Object.<anonymous> (/scratch/rpatrick/promises-rm-bug/index.js:34:1)
at Module._compile (internal/modules/cjs/loader.js:1236:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1257:10)
at Module.load (internal/modules/cjs/loader.js:1085:32)
at Function.Module._load (internal/modules/cjs/loader.js:950:14)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:60:12)
at internal/main/run_main_module.js:17:47
[rpatrick@rpatrick-1 promises-rm-bug]$
How often does it reproduce? Is there a required condition?
It works fine on MacOS and Windows but fails on Linux every time.
What is the expected behavior?
I expect for fsPromises.rm to be a function on Linux, just as it is on Windows and MacOS.
What do you see instead?
TypeError: fsPromises.rm is not a function
Additional information
[rpatrick@rpatrick-1 promises-rm-bug]$ node index.js deleteMe.txt
Attempting to delete deleteMe.txt
TypeError: fsPromises.rm is not a function
at /scratch/rpatrick/promises-rm-bug/index.js:12:16
at new Promise (<anonymous>)
at main (/scratch/rpatrick/promises-rm-bug/index.js:11:10)
at Object.<anonymous> (/scratch/rpatrick/promises-rm-bug/index.js:34:1)
at Module._compile (internal/modules/cjs/loader.js:1236:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1257:10)
at Module.load (internal/modules/cjs/loader.js:1085:32)
at Function.Module._load (internal/modules/cjs/loader.js:950:14)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:60:12)
at internal/main/run_main_module.js:17:47
[rpatrick@rpatrick-1 promises-rm-bug]$
On Linux, I installed node.js from https://nodejs.org/dist/v14.6.0/node-v14.6.0-linux-x64.tar.gz.
Metadata
Metadata
Assignees
Labels
No labels