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

env: node\r: No such file or directory #1

Closed
wyudong opened this issue Apr 12, 2017 · 7 comments
Closed

env: node\r: No such file or directory #1

wyudong opened this issue Apr 12, 2017 · 7 comments
Labels

Comments

@wyudong
Copy link

wyudong commented Apr 12, 2017

I run $ tablemark on Mac OSX and get the following error:

env: node\r: No such file or directory

It should be related to different line endings between Windows and Unix. Can you fix that?

Thank you

@haltcase
Copy link
Owner

haltcase commented Jun 27, 2017

I never saw this issue pop up, sorry to miss it like that. I'll look into this.

So, this is just from running the tablemark command alone? Have you installed it globally with npm i -g tablemark-cli?

@haltcase
Copy link
Owner

haltcase commented Jul 8, 2017

@wyudong I don't have a macOS system to test this out but it works fine on Linux ( bash & zsh ) and Windows. If you're able to give more info / a reproducible case feel free to reopen.

@haltcase
Copy link
Owner

haltcase commented Jul 8, 2017

@wyudong still wasn't able to repro it, but it might be fixed now in [email protected]. Thanks for reporting!

@mowies
Copy link

mowies commented Dec 20, 2021

I ran into this issue again today with the current version of the CLI on MacOS Big Sur 11.6
After changing the line endings manually to LF instead of CR, it worked fine for me.

@mowies
Copy link

mowies commented Dec 20, 2021

I forked this repo and implemented a small GH actions test pipeline that reproduces the issue. You can find the failing pipeline run here: https://github.com/mowies/tablemark-cli/actions/runs/1602033359

@haltcase
Copy link
Owner

haltcase commented Dec 30, 2021

Edit: You know, I only just recently rewrote this in TypeScript (and apparently already forgot that it wasn't always that way), so that doesn't have anything to do with it. Regardless, past releases must have used CRLF somehow and this should be resolved soon.

I think I figured out the cause of this. TypeScript uses a platform-specific default for line endings in emitted files (see https://www.typescriptlang.org/tsconfig/#newLine). Since my release builds have been created on Windows, the line endings of the bin script (./dist/cli.js) were CRLF. Configuring TS to use LF instead should fix this, and the upcoming v3 release will include that change.

Also, npm apparently normalizes line endings when you execute a bin script with it. From what I can tell Yarn doesn't do that which is why the issue appears when using it.

yarnpkg/yarn#8106

@haltcase haltcase reopened this Dec 30, 2021
@haltcase haltcase added the bug label Dec 30, 2021
haltcase added a commit that referenced this issue Jan 2, 2022
haltcase added a commit that referenced this issue Jan 2, 2022
@haltcase
Copy link
Owner

Apologies for the delay, but this should be resolved with the release of v3.0.0 and covered by new test cases.

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

No branches or pull requests

3 participants