marp-team / marp-cli

A CLI interface for Marp and Marpit based converters
MIT License
1.9k stars 108 forks source link

Marp crashes with NodeJS LTS 18.18.0 #546

Closed chrisdecker1201 closed 1 year ago

chrisdecker1201 commented 1 year ago

Version of Marp Tool

Marp CLI v3.2.1

Operating System

Windows

Environment

How to reproduce

  1. Install NodeJS 18.18.0 on Windows via choco
choco install nodejs-lts --version=18.18.0
  1. Install Marp CLI
npm install -g @marp-team/marp-cli
  1. Execute marp in server mode
marp -s -I .

Expected behavior

Same behaviour like in version 18.17.0.

I downgraded now and it's working :)

Actual behavior

The marp-cli command just return this error.

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 Bc.load (C:\Users\tb10dcc\AppData\Roaming\npm\node_modules\@marp-team\marp-cli\lib\marp-cli-376cca40.js:27:75570)
    at o (C:\Users\tb10dcc\AppData\Roaming\npm\node_modules\@marp-team\marp-cli\lib\marp-cli-376cca40.js:43:90184)
    at Lp.convertFile (C:\Users\tb10dcc\AppData\Roaming\npm\node_modules\@marp-team\marp-cli\lib\marp-cli-376cca40.js:43:91002)
    at Lp.convertFiles (C:\Users\tb10dcc\AppData\Roaming\npm\node_modules\@marp-team\marp-cli\lib\marp-cli-376cca40.js:43:91214)
    at async Vp (C:\Users\tb10dcc\AppData\Roaming\npm\node_modules\@marp-team\marp-cli\lib\marp-cli-376cca40.js:43:126747) {
  errno: -4058,
  code: 'ENOENT',
  syscall: 'open'
}

Node.js v18.18.0

Additional information

I use this here for just saying thank you for this great tool ❤.

yhatt commented 1 year ago

I've tested with Node.js 18.18.0 installed via the msi installer, but I could not reproduce the error on my Windows. If the error was brought by the specific directory structure, please share the structure for reproduction.

The stack trace shows it has brought the error by the Node.js internal module so Node.js installed via Chocolately might be causing something wrong (I could not test because I'm not a Chocolately user). It's hard to imagine there are some internal differences in the Node.js binary between installed via msi and via Chocolately, but I recommend reporting it to the Node.js issue tracker if it could reproduce also in the Node.js via msi installer.

chrisdecker1201 commented 1 year ago

I just uninstalled nodejs-lts with choco

choco uninstall nodejs-lts

And installed NodeJS 18.18.0 from the MSI (https://nodejs.org/en/download), but I'm still getting this error... I will open a bug on Node.js

yhatt commented 1 year ago

Caused by upstream: https://github.com/nodejs/node/issues/48673