-
Notifications
You must be signed in to change notification settings - Fork 3.5k
Open
Labels
bugSomething isn't workingSomething isn't workingnode.jsCompatibility with Node.js APIsCompatibility with Node.js APIs
Description
What version of Bun is running?
1.0.6+969da088f5db3258a803ec186012e30f992829b4
What platform is your computer?
Linux 5.15.0-86-generic x86_64 x86_64
What steps can reproduce the bug?
- bun add pm2
- start any pm2
bun node_modules/pm2/lib/binaries/CLI.js logsandbun node_modules/pm2/bin/pm2 logs
What is the expected behavior?
I expect both to show all logs of pm2 since bin/pm2 is just require('../lib/binaries/CLI.js')
What do you see instead?
When calling CLI.js directly the createReadStream from node_modules/pm2/lib/API/Log.js never sends any data
Additional information
This seems to be related to the {start: size} argument.
Because following code also does not produce any output with bun but does with node:
const fs = require("fs");
const path = require("path");
const file = path.resolve("test-out.log");
const size = Math.max(0, fs.statSync(file).size - (15 * 200));
console.log(size);
var fd = fs.createReadStream(file, {start: size});
fd.on('data', () => console.log("DATA"));
fd.on('end', () => console.log("END"));with test-out.log
Edgar-P-yan
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingnode.jsCompatibility with Node.js APIsCompatibility with Node.js APIs