How to use thenets/parsoid from Docker in Windows 10 to convert a local text file to html?

81 Views Asked by At

I've installed thenets/parsoid on Docker on Windows 10. I want to convert the text pomme.txt with directory path F:\zim\pomme.txt to html. I tried

docker run --name myparsoid -d -t -i -v /f/zim:/zim thenets/parsoid:latest sh
type /zim/pomme.txt | docker exec myparsoid node bin/parse.js --wt2html --offline

but it returns an error

Microsoft Windows [Version 10.0.19042.928]
(c) Microsoft Corporation. All rights reserved.

C:\Users\Akira>docker run --name myparsoid -d -t -i -v /f/zim:/zim thenets/parsoid:latest sh
7912b0cef8fba4244b2519f4f9603ec8e278b67bcc4fe08f4658721b98f941f3

C:\Users\Akira>type /zim/pomme.txt | docker exec myparsoid node bin/parse.js --wt2html --offline
The syntax of the command is incorrect.
internal/modules/cjs/loader.js:638
    throw err;
    ^

Error: Cannot find module '/bin/parse.js'
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:636:15)
    at Function.Module._load (internal/modules/cjs/loader.js:562:25)
    at Function.Module.runMain (internal/modules/cjs/loader.js:831:12)
    at startup (internal/bootstrap/node.js:283:19)
    at bootstrapNodeJSCore (internal/bootstrap/node.js:622:3)

It's very unclear to me which command to use to convert a local text file to html. Could you please elaborate on how to fix this issue?

0

There are 0 best solutions below