1

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?

Akira
  • 2,594
  • 3
  • 20
  • 45
  • In the example text you try to run `php`, but your error text is trying to run `node`. The documentation you link to also shows a `php` command. Can you double-check the command you're running? – David Maze Apr 14 '21 at 01:09
  • @DavidMaze I sent an email to the author who said that my Parsoid version is old and that I should try `node bin/parse.js`. If I run `type /zim/pomme.txt | docker exec myparsoid php bin/parse.php --wt2html --offline`, then it returns an error `OCI runtime exec failed: exec failed: container_linux.go:370: starting container process caused: exec: "php": executable file not found in $PATH: unknown`. – Akira Apr 14 '21 at 01:29
  • It's very unclear to me which command to use to convert a local text file to html. – Akira Apr 14 '21 at 01:29

0 Answers0