binaryoung / convert-atom-snippets-to-vscode

A tiny package that help you convert atom snippets to vscode format.
MIT License
15 stars 1 forks source link

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

Open gregpasha opened 6 years ago

gregpasha commented 6 years ago

Hi - I am trying to use this on a mac and get the following error: env: node\r: No such file or directory. Do you have any suggestions?

thanks! greg

slysenko commented 6 years ago

vim /usr/local/bin/convertSnippets :set ff=unix :wq

bernatfortet commented 6 years ago

Same problem here, @slysenko I could't figure out how to fix the issue with your suggestion. I guess the files need to be converted from windows format to unix? is that the issue?

slysenko commented 6 years ago

the suggestion that worked for me was to set the file format to Unix. so what you want to do is to open the file in vim editor, type ':' then type in 'set ff=unix', press Enter, then type ':' then type in 'wq' to save and exit

bernatfortet commented 6 years ago

@slysenko thanks for the clarification, that's what I was doing but it was not creating any effect for some reason. I ended up using this: awk '{ sub("\r$", ""); print }' winfile.txt > unixfile.txt Thanks

matbrady commented 6 years ago

Wasn't really clear from the discussion on how to resolve the issue. I was able to convert my extensions by installing the module locally and running the command. example:

node node_modules/convert-atom-snippets-to-vscode/src/command.js snippets/ vs-snippets/

this converts all the atom snippets in the snippets directory and creates VS Code snippets in a vs-snippets directory