Closed
Description
- Version:v10.4.1 (but seems to apply to any version of node using copyFile, tried 8.11 too)
- Platform: Linux 9c6e47477060 3.13.0-86-generic # 131-Ubuntu SMP Thu May 12 23:33:13 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux (inside docker container)
- Subsystem: filesystem / fs
require("fs").copyFile("/somevolume/text.txt","/somevolume/text2.txt",(err)=>{console.log(err)})
Expected behaviour - it copies the file
Actual behaviour - it fails to copy but no error is reported. This is not a file permissions issue as the command line cp
command works as the same user. Also if the destination exists, it gets deleted, but the overwriting file doesn't get written.
The above code works if the files are not on a docker volume. The old method using createReadStream
and createWriteStream
also works.
The docker image I am using is the heroku buildpack. https://github.com/heroku/heroku-buildpack-nodejs. (with dokku)