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

On Ubuntu 16: /usr/bin/env: ‘node’: No such file or directory #14

Closed
scriptzteam opened this issue Jan 21, 2017 · 22 comments
Closed

Comments

@scriptzteam
Copy link

scriptzteam commented Jan 21, 2017

I run:
apt install npm
git clone https://github.com/animetosho/Nyuu.git
cd Nyuu
npm install --no-optional --production
ln -s "pwd/bin/nyuu.js" /usr/bin/nyuu
chmod a+x bin/nyuu.js
nyuu
/usr/bin/env: ‘node’: No such file or directory

Fixed by:

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

:)

@animetosho
Copy link
Owner

Fixed by: ln -s /usr/bin/nodejs /usr/bin/node

The more Debian/Ubuntu way to do it is apt-get install nodejs-legacy, though it ultimately does the same thing.

Alternatively, you can edit the first line of the bin/nyuu.js file to use nodejs instead of node. :)

@scriptzteam
Copy link
Author

Thx :)

@iwhyer
Copy link

iwhyer commented May 14, 2017

@animetosho Thanks :)

@Maximumz
Copy link

Thanks @animetosho

@desouzag
Copy link

@animetosho Still up-to-date thank you

@Ash-Radwan
Copy link

@animetosho Still rolling thanks !

@arlCode
Copy link

arlCode commented Jun 19, 2017

Worked for me, thanks!

@MalloZup
Copy link

btw shouldn't be nodejs-legacy the default one? to me look like a bug on debian. I had same issue on ubuntu 17.04

I vote for a bug on packaging debian

@animetosho
Copy link
Owner

animetosho commented Jul 29, 2017

My guess is that they don't want to pollute the node name, possibly because another application uses it. NodeJS wants their binary to be called "node", but Debian wants it to be called "nodejs".

I probably wouldn't consider it a bug, in fact, I'd blame NodeJS for going for such a generic name. Though I'd agree that perhaps the nodejs package could recommend nodejs-legacy as I can see it being a common mistake.

@marciotognere
Copy link

thanks

@SolArt7
Copy link

SolArt7 commented Sep 23, 2017

Thanks!

@Bidon15
Copy link

Bidon15 commented Oct 23, 2017

Thanks so much!

@RezaNurRochmat13
Copy link

Thanks its working :)

@amirgee
Copy link

amirgee commented Feb 1, 2018

Thanks Thanks Thanks :-*

@phsantosjr
Copy link

Thanks

@abhishek321
Copy link

abhishek321 commented Feb 18, 2018

Thanks :)

@M-Devloo
Copy link

M-Devloo commented Mar 3, 2018

Still works as a charm! Thanks

@djgio02
Copy link

djgio02 commented Nov 15, 2018

Thanks

webberig pushed a commit to express-webpack-ultimate-guide/guide that referenced this issue Dec 21, 2018
@topsailcashew-zz
Copy link

Fixed by: ln -s /usr/bin/nodejs /usr/bin/node

The more Debian/Ubuntu way to do it is apt-get install nodejs-legacy, though it ultimately does the same thing.

Alternatively, you can edit the first line of the bin/nyuu.js file to use nodejs instead of node. :)

I tried this option and it seems things are just messed up a lot more.

      let notifier = require('update-notifier')({pkg})
      ^^^

SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode
    at exports.runInThisContext (vm.js:53:16)
    at Module._compile (module.js:374:25)
    at Object.Module._extensions..js (module.js:417:10)
    at Module.load (module.js:344:32)
    at Function.Module._load (module.js:301:12)
    at Function.Module.runMain (module.js:442:10)
    at startup (node.js:136:18)
    at node.js:966:3```

@VanessaMachi
Copy link

Fixed by: ln -s /usr/bin/nodejs /usr/bin/node

The more Debian/Ubuntu way to do it is apt-get install nodejs-legacy, though it ultimately does the same thing.
Alternatively, you can edit the first line of the bin/nyuu.js file to use nodejs instead of node. :)

I tried this option and it seems things are just messed up a lot more.

      let notifier = require('update-notifier')({pkg})
      ^^^

SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode
    at exports.runInThisContext (vm.js:53:16)
    at Module._compile (module.js:374:25)
    at Object.Module._extensions..js (module.js:417:10)
    at Module.load (module.js:344:32)
    at Function.Module._load (module.js:301:12)
    at Function.Module.runMain (module.js:442:10)
    at startup (node.js:136:18)
    at node.js:966:3```

I meet the same problem, is there any solution

@VanessaMachi
Copy link

Fixed by: ln -s /usr/bin/nodejs /usr/bin/node

The more Debian/Ubuntu way to do it is apt-get install nodejs-legacy, though it ultimately does the same thing.
Alternatively, you can edit the first line of the bin/nyuu.js file to use nodejs instead of node. :)

I tried this option and it seems things are just messed up a lot more.

      let notifier = require('update-notifier')({pkg})
      ^^^

SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode
    at exports.runInThisContext (vm.js:53:16)
    at Module._compile (module.js:374:25)
    at Object.Module._extensions..js (module.js:417:10)
    at Module.load (module.js:344:32)
    at Function.Module._load (module.js:301:12)
    at Function.Module.runMain (module.js:442:10)
    at startup (node.js:136:18)
    at node.js:966:3```

https://stackoverflow.com/questions/50316693/npm-update-broke-npm this solution fixed my problem

@tamil07
Copy link

tamil07 commented Aug 13, 2019

Getting the below error, post fixing the nodejs issue.

root@ubuntu1604:~/hygieia/UI# gulp serve
[10:48:36] Using gulpfile ~/hygieia/UI/gulpfile.js
[10:48:36] Starting 'build'...
[10:48:36] Starting 'clean'...
[10:48:36] Finished 'clean' after 60 ms
[10:48:36] Starting 'assets'...
[10:48:36] Starting 'themes'...
[10:48:36] Starting 'fonts'...
[10:48:36] Starting 'js'...
[10:48:36] Starting 'views'...
[10:48:36] Starting 'test-data'...
[10:48:46] Finished 'themes' after 9.68 s
[10:48:46] Finished 'assets' after 9.69 s
[10:48:46] Finished 'test-data' after 9.74 s
[10:48:46] Finished 'views' after 9.92 s
[10:48:47] Finished 'js' after 10 s
[10:48:52] Finished 'fonts' after 15 s
[10:48:52] Starting 'html'...
[10:48:52] gulp-inject 29 files into index.html.
[10:48:52] gulp-inject 171 files into index.html.
[10:48:52] Finished 'html' after 192 ms
[10:48:52] Finished 'build' after 16 s
[10:48:52] Starting 'serve'...
[10:48:52] 'serve' errored after 6.4 ms
[10:48:52] SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode
at exports.runInThisContext (vm.js:53:16)
at Module._compile (module.js:374:25)
at Object.Module._extensions..js (module.js:417:10)
at Module.load (module.js:344:32)
at Function.Module._load (module.js:301:12)
at Module.require (module.js:354:17)
at require (internal/module.js:12:17)
at Object. (/root/hygieia/UI/node_modules/localtunnel/node_modules/debug/src/index.js:9:19)
at Module._compile (module.js:410:26)
at Object.Module._extensions..js (module.js:417:10)

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