Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Application (Marp) is broken after upgrading from 18.17.0 to 18.18.0 #49850

Closed
chrisdecker1201 opened this issue Sep 25, 2023 · 8 comments
Closed
Labels
v18.x Issues that can be reproduced on v18.x or PRs targeting the v18.x-staging branch. windows Issues and PRs related to the Windows platform.

Comments

@chrisdecker1201
Copy link

chrisdecker1201 commented Sep 25, 2023

Version

18.18.0

Platform

Microsoft Windows NT 10.0.19045.0 x64

Subsystem

No response

What steps will reproduce the bug?

I first created a bug here: marp-team/marp-cli#546, but it seems to be an issue with NodeJS.

  1. Install nodejs-lts 18.17.0 with choco
choco install nodejs-lts --version 18.17.0
  1. Install marp-cli
npm install -g @marp-team/marp-cli
  1. Execute marp. ✔ Everything works fine
marp -s -I .
  1. Update `nodejs-lts
choco upgrade nodejs-lts
  1. Execute marp. ❌ An error occurs
marp -s -I .

How often does it reproduce? Is there a required condition?

Everytime

What is the expected behavior? Why is that the expected behavior?

The same like in nodejs 18.17.0

What do you see instead?

node:internal/fs/promises:590
    await binding.openFileHandle(pathModule.toNamespacedPath(path),
                  ^

Error: ENOENT: no such file or directory, open
    at open (node:internal/fs/promises:590:19)
    at Object.readFile (node:internal/fs/promises:1025:20)
    at xc.load (C:\Users\tb10dcc\AppData\Roaming\npm\node_modules\@marp-team\marp-cli\lib\marp-cli-b4d0269e.js:27:75570)
    at o (C:\Users\tb10dcc\AppData\Roaming\npm\node_modules\@marp-team\marp-cli\lib\marp-cli-b4d0269e.js:43:90371)
    at zp.convertFile (C:\Users\tb10dcc\AppData\Roaming\npm\node_modules\@marp-team\marp-cli\lib\marp-cli-b4d0269e.js:43:91189)
    at zp.convertFiles (C:\Users\tb10dcc\AppData\Roaming\npm\node_modules\@marp-team\marp-cli\lib\marp-cli-b4d0269e.js:43:91401)
    at async rf (C:\Users\tb10dcc\AppData\Roaming\npm\node_modules\@marp-team\marp-cli\lib\marp-cli-b4d0269e.js:43:126908) {
  errno: -4058,
  code: 'ENOENT',
  syscall: 'open'
}

Node.js v18.18.0

Additional information

No response

@bnoordhuis
Copy link
Member

What path did you pass to fs.readFile()? If it includes special characters, then please post it verbatim; it might be an encoding issue.

@bnoordhuis bnoordhuis added windows Issues and PRs related to the Windows platform. v18.x Issues that can be reproduced on v18.x or PRs targeting the v18.x-staging branch. labels Sep 25, 2023
@chrisdecker1201
Copy link
Author

I executed with the absolute path and it's the same error

marp -s -I C:\Users\tb10dcc\workspace\GOMAHTalk

I think that this is the path that is passed to fs.readFile().

@bnoordhuis
Copy link
Member

Can you do better than "I think"? Ideally try whittling it down to a test case that's only a few lines without third-party code. Bug reports that consist of "please look at my thousands of lines of code" usually don't go anywhere.

@chrisdecker1201
Copy link
Author

@bnoordhuis Thank you for looking into this issue ☺. I'm not responsible of the marp-cli. I think maybe @hyatt can answer this question better

@yhatt
Copy link

yhatt commented Sep 25, 2023

I am the author of the Node.js application that received an original Issue mentioned above.

@chrisdecker1201 I don't have the psychic ability to see through the structure in your folder, so I can't do anything with current information. Please share more specific path to the actual document file where the error occurs, not the path to the folder. Then, it should be able to create a minimal reproduction if the encoding is the actual cause.

@chrisdecker1201
Copy link
Author

chrisdecker1201 commented Sep 25, 2023

@yhatt Thank you for your time :). I narrowed it down to the following. Sorry for the bad error description.

I have a file in the folder with the name 💻 rich.md (with the emoticon)

In 18.17.0 this was no Problem. In 18.18.0 this leads to the error message mentioned.

@bnoordhuis
Copy link
Member

That sounds like #48673, #48673 (comment) in particular. Do you agree? If yes, it's best to close this issue and continue in the other one.

@chrisdecker1201
Copy link
Author

Yes. Thank you :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
v18.x Issues that can be reproduced on v18.x or PRs targeting the v18.x-staging branch. windows Issues and PRs related to the Windows platform.
Projects
None yet
Development

No branches or pull requests

3 participants