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

false-positive "Preview.js needs NodeJS 18+ to run" #2735

Open
LennyLizowzskiy opened this issue Jul 28, 2024 · 1 comment
Open

false-positive "Preview.js needs NodeJS 18+ to run" #2735

LennyLizowzskiy opened this issue Jul 28, 2024 · 1 comment

Comments

@LennyLizowzskiy
Copy link

LennyLizowzskiy commented Jul 28, 2024

Describe the bug

It tries to check the Node version but receives a strange output and crashes.

VSCode's "Output" window text:

$ node --version
unicode_start skipped on not a tty
linux
01816161c4746e28a9a7b3c4b28a48ba4b05a292a368ea4a27c5c9c58a6a69c9c4746ea8a9a7bbc4b28ac8ba4b0da292a3e8ea4a2fc5c9c5linux
01816161c4746e28a9a7b3c4b28a48ba4b05a292a368ea4a27c5c9c58a6a69c9c4746ea8a9a7bbc4b28ac8ba4b0da292a3e8ea4a2fc5c9c5v22.3.0
Preview.js needs NodeJS 18+ to run.

Please upgrade then restart your IDE.
Preview.js daemon could not be started.

When I check the version myself via the terminal:

~ 
 node --version
v22.3.0

~ 
 node -v
v22.3.0

~ 
 npm -v
10.8.1

~ 
 pnpm -v
9.4.0

Tried both the latest available and the LTS node and the error persists.

Reproduction

  1. Start VSCode
  2. Error occurs on VSCode start

That's all

Preview.js version

extension version: v1.28.1

Framework

Any

System Info

System:
    OS: Linux 6.9 NixOS 24.11 (Vicuna) 24.11 (Vicuna)
    CPU: (16) x64 AMD Ryzen 7 5800U with Radeon Graphics
    Memory: 9.51 GB / 14.49 GB
    Container: Yes
    Shell: 3.7.1 - /run/current-system/sw/bin/fish
  Binaries:
    Node: 22.3.0 - /etc/profiles/per-user/lennylizowzskiy/bin/node
    Yarn: 1.22.22 - /etc/profiles/per-user/lennylizowzskiy/bin/yarn
    npm: 10.8.1 - /etc/profiles/per-user/lennylizowzskiy/bin/npm
    pnpm: 9.4.0 - /etc/profiles/per-user/lennylizowzskiy/bin/pnpm
    bun: 1.1.20 - /etc/profiles/per-user/lennylizowzskiy/bin/bun
  IDEs:
    VSCode: 1.91.1 - /etc/profiles/per-user/lennylizowzskiy/bin/code
  Browsers:
    Brave Browser: 126.1.67.123

Used Package Manager

pnpm

Extension logs (useful for crashes)

No response

Preview logs (useful for rendering errors)

No response

Repo link (if available)

No response

Anything else?

Maybe add an option to disable version checking in extension's settings?

Also, I think it's Starship (https://starship.rs/) that causes the output to be invalid.

@pavitra-infocusp
Copy link

Faced with a similar error

$ node --version
bash: cannot set terminal process group (307374): Inappropriate ioctl for device
bash: no job control in this shell
Preview.js needs NodeJS 18+ to run.

Please upgrade then restart your IDE.
Preview.js daemon could not be started.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants