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

[BUG] Can't execute ts codeblocks - macOS - node installed via https://github.com/tj/n #369

Open
luckman212 opened this issue Jul 29, 2024 · 3 comments
Labels
bug Something isn't working

Comments

@luckman212
Copy link

Describe the bug

ts codeblocks fail to execute, with a env: node: No such file or directory error. I have checked my paths and settings.

Software Version

  • macOS 14.5
  • Obsidian 1.6.7
  • plugin ver 1.12.0
  • node version: v22.5.1
  • ts-node version: v10.9.2
~ $ /Users/luke/.n/bin/ts-node --version
v10.9.2
~ $ /Users/luke/.n/bin/node --version
v22.5.1

To Reproduce

image

Screenshots

image

image
@luckman212 luckman212 added the bug Something isn't working label Jul 29, 2024
@luckman212
Copy link
Author

JS runs ok, btw... same path

image image

@luckman212
Copy link
Author

luckman212 commented Jul 29, 2024

Seems heavily related... #87

edit: after reading through all the way to the end of that issue, the simplest fix was to switch to bun (thanks @zieka!)

I installed it to /usr/local/bin btw:

$ which bun
/usr/local/bin/bun

et voilà ...

image

@twibiral I might suggest making this a default as it seems "out of the box" that ts-node is just broken on macOS...

@zieka
Copy link

zieka commented Jul 29, 2024

edit: after reading through all the way to the end of that issue, the simplest fix was to switch to bun (thanks @zieka!)

no problem 🍻

Also looks like node might support directly running ts files in the near future via an experimental flag:

For now though using an executable that already can like bun seems to be the easiest:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants