Closed MichaelC001 closed 3 months ago
This is due to the fact the Docker image is built for x86 processors.
Had the same problem. window x86
I use the following command
npm install "single-file-cli"
cd node_modules/single-file-cli
Then the code will keep stuck and no results. like this:
I used the release version single-file.exe
and the result was the same.
When I go to the .bin
directory and execute it, I get a correct .html file
, but the terminal will report an error like this.
My Deno version is as follows:
I'll see if I can reproduce this problem in Windows. There's something that puzzles me though. The code is executed in Node.js instead of Deno. This can be seen in your screenshot of the displayed error. Have you renamed single-file-node.js
to single-file
?
I'm getting the same error. havent been able to figure it out yet
Got the same deno error when using the npm installed version, but it works with the newest single-file.exe version
@andjar Thank you for the additional info. This tends to confirm that the issue is related to the Node.js support. What version of Node.js have you on you machine?
Update: In my case, the error was solved by ensuring that deno was in fact installed (winget install DenoLand.Deno
)
The error message I got before was:
C:\Users\andjar>single-file https://wikipedia.org wikipedia.html
Process exited with code null
file:///C:/Users/andjar/AppData/Roaming/npm/node_modules/single-file-cli/lib/deno-polyfill.js:86
reject(new Error(`Process exited with code ${code}`));
^
Error: Process exited with code null
at ChildProcess.<anonymous> (file:///C:/Users/andjar/AppData/Roaming/npm/node_modules/single-file-cli/lib/deno-polyfill.js:86:14)
at ChildProcess.emit (node:events:518:28)
at ChildProcess._handle.onexit (node:internal/child_process:294:12)
Node.js v20.12.0
@andjar Thank you, if it's possible for you, could you try to edit the file /lib/deno-polyfill.js
in the folder where single-file-cli
is installed, replace the line 83 (see below) and tell me if it fixes the issue when using Node.js?
Replace:
if (code === 0 || code === 143 || code === 130) {
with:
if (code === 0 || code === 143 || code === 130 || code === null) {
So, after running winget install DenoLand.Deno
in cmd, single-file
started working from the command line. When called from R, however, using system()
it still failed with the same error as above. However, after adding || code === null
as requested, it started working from R as well.
To confirm, I removed || code === null
again from /lib/deno-polyfill.js
, and the error re-appeared when called from R.
Thanks, I think you got it!
Thank you very much for your help and your responsiveness, I have fixed the issue in the version 2.0.45
that I've just released and published on NPM.
MacOS gets the error when I attempt to save the page