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

node\r: No such file or directory #198

Closed
adelarsq opened this issue Jan 10, 2018 · 8 comments
Closed

node\r: No such file or directory #198

adelarsq opened this issue Jan 10, 2018 · 8 comments
Assignees
Labels

Comments

@adelarsq
Copy link
Contributor

adelarsq commented Jan 10, 2018

Trying to initiate the server in the console on OSX shows an error:

→ docker-langserver --stdio
env: node\r: No such file or directory

Related issue nwutils/nw-builder#75

Update:
Solved with:

→ cd  ~/.config/yarn/global/node_modules/dockerfile-language-server-nodejs/bin
→ sudo dos2unix docker-langserver
dos2unix: converting file docker-langserver to Unix format...
@rcjsuen
Copy link
Owner

rcjsuen commented Jan 10, 2018

Thank you for the bug report, @adelarsq. Looks like the file uses \n for its newlines in the repository but I published it with \r\n when I cloned it on Windows because of my auto.crlf setting.

@rcjsuen rcjsuen self-assigned this Jan 10, 2018
@rcjsuen
Copy link
Owner

rcjsuen commented Jan 10, 2018

@adelarsq This should be fixed in the new v0.0.12 release. Could you install it and give it a try?

@rcjsuen rcjsuen added the bug label Jan 10, 2018
@adelarsq
Copy link
Contributor Author

@rcjsuen It's fixed. Thanks.

@zoedsoupe
Copy link

I have this same issue on Arch Linux with the latest version of docker-langserver

@Frederick888
Copy link

Can confirm. I fixed it locally for now. Perhaps set up CI/CD somewhere to publish new versions if @rcjsuen usually works under Windows?

@rcjsuen
Copy link
Owner

rcjsuen commented Jan 27, 2021

I have this same issue on Arch Linux with the latest version of docker-langserver

@Mdsp9070 Apologies for not responding to this earlier. Looks like it got lost in my notifications. I'm surprised that this is happening since the docker-langserver file hasn't been touched in a while. I ran npm install -g docker-langserver on macOS and did not experience any problems with 0.3.0. 🤔

@Frederick888
Copy link

Frederick888 commented Jan 27, 2021

@rcjsuen It seems npm does its magic converting CRLF to LF. If you use yarn global add dockerfile-language-server-nodejs instead, the entry script will have CRLF under Linux/macOS, rendering it unusable.

$ wget "$(npm view dockerfile-language-server-nodejs dist.tarball)"
$ tar xvf dockerfile-language-server-nodejs-0.3.0.tgz
$ uniname package/bin/docker-langserver | rg CR\|LF
No LINES variable in environment so unable to determine lines per page.
Using default of 24.
       19         19  00000D   0D                     CARRIAGE RETURN (CR)
       20         20  00000A   0A                     LINE FEED (LF)
      116        116  00000D   0D                     CARRIAGE RETURN (CR)
      117        117  00000A   0A                     LINE FEED (LF)
      166        166  00000D   0D                     CARRIAGE RETURN (CR)
      167        167  00000A   0A                     LINE FEED (LF)
      263        263  00000D   0D                     CARRIAGE RETURN (CR)
      264        264  00000A   0A                     LINE FEED (LF)
      361        361  00000D   0D                     CARRIAGE RETURN (CR)
      362        362  00000A   0A                     LINE FEED (LF)
      388        388  00000D   0D                     CARRIAGE RETURN (CR)
      389        389  00000A   0A                     LINE FEED (LF)

@rcjsuen
Copy link
Owner

rcjsuen commented Apr 13, 2021

@Mdsp9070 @Frederick888 This should be fixed in the latest 0.4.1 release. Thank you again for the bug report.

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

4 participants