diff --git a/index.js b/index.js
index <HASH>..<HASH> 100644
--- a/index.js
+++ b/index.js
@@ -1,4 +1,5 @@
-const path = require('path').posix
+const pathRoot = require('path')
+const path = pathRoot.posix || pathRoot
 const { EventEmitter } = require('events')
 
 const collect = require('stream-collector')
diff --git a/lib/iterator.js b/lib/iterator.js
index <HASH>..<HASH> 100644
--- a/lib/iterator.js
+++ b/lib/iterator.js
@@ -1,4 +1,5 @@
-const p = require('path').posix
+const pathRoot = require('path')
+const p = pathRoot.posix || pathRoot
 const nanoiterator = require('nanoiterator')
 const toStream = require('nanoiterator/to-stream')
fix path.posix not being available in browsers