Linux NodeJS global NPM package ": no such file or directory"

I am using Ubuntu 14.04 and installed nodejsand npmusing:

sudo apt-get install nodejs npm

Then I made a symlink to allow packages to use the interpreter node(instead nodejs):

sudo ln -s /usr/bin/nodejs /usr/local/bin/node

I installed coffee-script(for testing purposes) and my own package mangarackwith:

sudo npm -g install coffee-script mangarack

When I started coffee(part coffee-script), this package will work fine. If I run mangarack, I will get:

: No such file or directory.

I have the following in mine package.json:

"bin": {
  "mangarack": "./bin/mangarack"
},

And this file contains:

#!/usr/bin/env node

require('../lib/cli/index');

, coffee-script, , require , console.log, , node. . -configure, Linux- ?

:

+4
1

, bin/mangarack , linux. , :

$ mangarack --help
env: node\r: No such file or directory

$ head -n 1 `which mangarack` | hexdump
0000000 23 21 2f 75 73 72 2f 62 69 6e 2f 65 6e 76 20 6e
0000010 6f 64 65 0d 0a
0000015

\r (0d ) node. .

: $ git config core.autocrlf, . . https://help.github.com/articles/dealing-with-line-endings/

:

$ head -n 1 `which mangarack` | hexdump
0000000 23 21 2f 75 73 72 2f 62 69 6e 2f 65 6e 76 20 6e
0000010 6f 64 65 0a
0000015
+10

All Articles