Topic on Talk:Parsoid

Jump to navigation Jump to search

How to use thenets/parsoid in Docker in Windows 10?

1
DungLe94 (talkcontribs)

I've installed thenets/parsoid on Docker on Windows 10. I want to convert the text file 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 php bin/parse.php --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)

Could you please shed some light on how to fix the error?

Reply to "How to use thenets/parsoid in Docker in Windows 10?"