nodemon: Nodemon and Fedora `node: No such file or directory`

If you try to run $ nodemon server.js

You’ll get : /usr/bin/env: node: No such file or directory

This is because in Fedora node is called nodejs

This can be fixed by changing: #!/usr/bin/env node on the first line of /usr/lib/node_modules/nodemon/nodemon.js to #!/usr/bin/env nodejs

About this issue

  • Original URL
  • State: closed
  • Created 12 years ago
  • Reactions: 1
  • Comments: 17 (3 by maintainers)

Most upvoted comments

The solution/workaround is really simple. This is Linux 101:

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

Fedora and Ubuntu pakage node as nodejs, because node.dpkg is

Description-en: Amateur Packet Radio Node program
 The node program accepts TCP/IP and packet radio network connections and
 presents users with an interface that allows them to make gateway connections
 to remote hosts using a variety of amateur radio protocols.

They make the binary is nodejs, rather than node. So long as you’re not using that Packet Radio Node Program mentioned above the workaround will work.

thanks @codekiln for helping out the stray googler 😃