Skip to content

Commit 2dccb32

Browse files
committed
Fixed: Unable to load file on windows.
1 parent ee6a925 commit 2dccb32

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

package-lock.json

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@nosferatu500/textract-lite",
3-
"version": "7.0.11",
3+
"version": "7.0.13",
44
"type": "module",
55
"homepage": "https://github.com/nosferatu500/textract-lite",
66
"description": "Extracting text from files of various type including txt, doc, docx.",

src/extract.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,10 @@ async function initializeExtractors() {
2727
hasInitialized = true;
2828

2929
// discover available extractors
30-
const extractors = await Promise.all(fs.readdirSync(pathToFileURL(extractorPath)).map(async (item: any) => {
30+
const extractors = await Promise.all(fs.readdirSync(extractorPath).map(async (item: any) => {
3131
const fullExtractorPath = path.join(extractorPath, item);
3232
// get the extractor
33-
const { default: extractor } = await import(fullExtractorPath);
33+
const { default: extractor } = await import(pathToFileURL(fullExtractorPath).toString());
3434

3535
return extractor;
3636
}));

0 commit comments

Comments
 (0)