Error:/usr/bin/env: node: No such file or directory

0 votes

I installed node js and npm via apt-get install and all of the dependencies, then I installed browserify

npm install browserify -g

it goes through the process and it seems like it installed correctly, but when I try to do a simple bundle per this walkthrough

I get the error:

/usr/bin/env: node: No such file or directory

How to solve this?

Oct 11 in Node-js by kartik
• 35,820 points
223 views

1 answer to this question.

0 votes

Hello @kartik,

You have to manually link to "node" as many packages are programmed after the "node" binary. Something similar also occurs with "python2" not linked to "python".

In this case you can do an easy symlink. For linux distributions which install package binaries to /usr/bin you can do

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

Hope it helps!!

Thank you!!

answered Oct 11 by Niroj
• 78,120 points

Related Questions In Node-js

0 votes
1 answer
0 votes
1 answer

Error:Missing file extension "ts" for "./lib/env" import/extensions

Hello @kartik, Add the following code to rules: "rules": { ...READ MORE

answered Oct 15 in Node-js by Niroj
• 78,120 points
219 views
0 votes
1 answer

Error:node' is not recognized as an internal or external command

Hello @kartik, Node is missing from the SYSTEM ...READ MORE

answered Oct 15 in Node-js by Niroj
• 78,120 points
186 views
0 votes
1 answer

Error:npm WARN package.json: No repository field

Hello @kartik, If you are getting this from ...READ MORE

answered Jul 9 in Node-js by Niroj
• 78,120 points
782 views
0 votes
1 answer

jQuery AJAX fires error callback on window unload - how do I filter out unload and only catch real errors?

Hello, In the error callback or $.ajax you have three ...READ MORE

answered Apr 27 in Java-Script by Niroj
• 78,120 points
448 views
0 votes
1 answer

How do I pass command line arguments to a Node.js program?

Hello @kartik, If your script is called myScript.js ...READ MORE

answered May 5 in Java-Script by Niroj
• 78,120 points
697 views
0 votes
1 answer

Error:Issue when trying to use IN() in wordpress database

Hello @kartik, Try this code : // Create an ...READ MORE

answered May 8 in PHP by Niroj
• 78,120 points
91 views
+2 votes
1 answer

How do I debug Node.js applications?

Hello @kartik, Use node-inspector  from any browser supporting WebSocket. Breakpoints, ...READ MORE

answered Jul 8 in Node-js by Niroj
• 78,120 points
87 views
0 votes
1 answer

npm WARN enoent ENOENT: no such file or directory, open 'C:\Users\Niroj\package.json'

Hello @kartik, If you already have package-lock.json file just delete ...READ MORE

answered Oct 13 in Node-js by Niroj
• 78,120 points
582 views
0 votes
1 answer