You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Dec 25, 2024. It is now read-only.
I was following the guide in the README on Ubuntu Linux 19.04. When I tried to run yarn start I encountered the following error:
$ yarn start
yarn run v1.16.0
warning package.json: No license field
$ deskgap .
/usr/bin/env: ‘node\r’: No such file or directory
error Command failed with exit code 127.
If I execute /usr/bin/env node directly it works as expected:
$ /usr/bin/env node
Welcome to Node.js v12.4.0.
Type ".help" for more information.
>
Eventually I was able to resolve the issue by running dos2unix on the cli.js file:
$ dos2unix ./node_modules/deskgap/cli.js
dos2unix: converting file ./node_modules/deskgap/cli.js to Unix format...
The file command shows that cli.js (and it looks like the rest of the files too) has CRLF line terminators:
$ file ./node_modules/deskgap/cli.js
./node_modules/deskgap/cli.js: a /usr/bin/env node script, ASCII text executable, with CRLF line terminators
The text was updated successfully, but these errors were encountered:
I've been reading up on this and it sounds like if you check the project out with git the line endings should be fixed automatically.
The problem seems to happen when you check the project out on a windows computer, then publish to NPM, as explained in this NPM issue.
I think we might be able to set npm/cli.js text eol=lf in a .gitattributes file to prevent this from happening? It would ensure that the line endings are always converted to LF on checkout, even on Windows. We would then need to publish a new package. I don't have a Windows machine to test this on and confirm it doesn't break anything though.
Hello,
I was following the guide in the README on Ubuntu Linux 19.04. When I tried to run
yarn start
I encountered the following error:If I execute
/usr/bin/env node
directly it works as expected:Eventually I was able to resolve the issue by running
dos2unix
on thecli.js
file:The
file
command shows thatcli.js
(and it looks like the rest of the files too) has CRLF line terminators:The text was updated successfully, but these errors were encountered: