Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
hellocatfood opened this issue Apr 16, 2016 · 2 comments
Open

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

hellocatfood opened this issue Apr 16, 2016 · 2 comments

Comments

@hellocatfood
Copy link

When I run svg-resizer on Ubuntu 15.10 I get the following error:

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

I already have nodejs installed

@hellocatfood
Copy link
Author

Following advice from this nodejs/node-v0.x-archive#3911 (comment) I installed nodejs-legacy but then got the following error when I tried to run the script:

module.js:340
throw err;
^
Error: Cannot find module 'shelljs/global'
at Function.Module._resolveFilename (module.js:338:15)
at Function.Module._load (module.js:280:25)
at Module.require (module.js:364:17)
at require (module.js:380:17)
at Object. (/home/hellocatfood/Desktop/svg-resizer/svg-resizer.js:3:1)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Function.Module.runMain (module.js:497:10)

@tvek
Copy link

tvek commented Jun 2, 2017

Problem Author : @hellocatfood
Cause of Bug : node.js is not accessible by the desired module("svg-resizer") since it may not be defined in global PATH variable

Steps#1 : Try to download the latest "nodejs" from official website( https://nodejs.org/en/download/ ) for your required OS(Linux/Ubuntu)

Steps#2 : Install the node using

2.1) move to downloaded directory
cd "<to_the_directory_containing_the_downloaded_file>"
2.2) Install by extracting the content from the file and move it to /usr/local
tar Xvf -C /usr/local ./node-v4.4.0-linux-x64.tar.xz

Steps#3 : Add the node to the global variable PATH to access by every application through console(Terminal)

3.1) Edit the initializer using any of your text editor(here i am using gedit)
gedit ~/.bashrc
3.2) Add the node repository to your PATH by exporting command
add the above lines of code to the end of ".bashrc" file
export PATH=/usr/local/nodejs/bin:$PATH

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants