Search This Blog

Loading...

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


The Problem


You have installed npm or nodejs and the second you go to use it you receive an error message:

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

The Cause


Package managers. *sigh* What is normally named node is named nodejs.

$ which nodejs
/usr/bin/nodejs


The Solution


[ -d ~/bin ] || mkdir ~/bin
ln -s $(which nodejs) ~/bin/node

This will allow your system to find node.

There must be some reason behind the package maintainers renaming node to nodejs, probably to avoid a conflict, so you don't really want to be renaming files, or making the changes system-wide (/usr/local/bin) unless you know what you are doing.

$ node --help
Usage: node [options] [ -e script | script.js ] [arguments]
node debug script.js [arguments]

Options:
-v, --version print node's version
-e, --eval script evaluate script
-p, --print evaluate script and print result
-i, --interactive always enter the REPL even if stdin
does not appear to be a terminal
--no-deprecation silence deprecation warnings
--trace-deprecation show stack traces on deprecations
--v8-options print v8 command line options
--max-stack-size=val set max v8 stack size (bytes)

Environment variables:
NODE_PATH ':'-separated list of directories
prefixed to the module search path.
NODE_MODULE_CONTEXTS Set to 1 to load modules in their own
global contexts.
NODE_DISABLE_COLORS Set to 1 to disable colors in the REPL

Documentation can be found at http://nodejs.org/


Great stuff!

References:
https://github.com/nodejs/node-v0.x-archive/issues/3911#issuecomment-8956154

YouTube Poll Cards are gert lush, honest!

Card teaser on a YouTube video

Everyone loves polls. It's just a fact. YouTube know this so they have introduced Poll Cards to creators.

A YouTube video showing a Poll CardClose-up of a YouTube Poll Card

Cards are interactive elements that slide into view during a YouTube video which prompts a user to interact in one of a number of ways. You can use a Card to:
  • Promote a video or playlist
  • Promote a channel
  • Ask users to take part in a poll
  • Link to an approved website
  • Ask users to donate to a non-profit
  • Beg for money

Unless you're using an overbearing adblock, you'll see them in the video that you're watching.

Filling out a YouTube Poll Card

This, of course, allows users to give you quick feedback where they might not be able to use the comments section, such as when the video is embedded into another site or a third-party application, assuming the application can handle them; or if they just can't be bothered to scroll down a bit. It offers the user an easy way to interact.

The cards can be updated at any time to ask a different set of questions. The video, of course, cannot without uploading a whole new video, bar simple editing like video quality. If you add your own comment asking questions it could be buried under the avalanche of xenophobic bilge that always fills a YouTube comments thread. This way your question will be seen.

You can change your answer too, should you choose the wrong option the first time.

Changing my choice on a YouTube Poll Card

If you're a creator in good standing it is incredibly easy to add a Poll Card.

From your My Videos click on the drop-down menu next to the video you want to add a card to and select Cards.

Selecting 'Cards' from the drop-down menu in 'My Videos'

Once you're in there, pick the position of the video where you want your teaser to appear then click Add card. From there you can select Poll and fill in the details. It is a very simple interface: there's no room for confusion.

Selecting the 'Add Card' drop-downFilling out the Poll Card options

Click Save and it's done! You can click on the little i to see your new Poll card. Lush.

A video with cards added


New frontiers in communication systems

New research by the universities of Bristol, Keio and industrial partners have unlocked 80 THz of fibre-optic bandwidth that will enable future exascale data centres and transform 5G networks.

The research on optical communication technologies, wavelength division multiplexing and networks form the backbone of every wired network across the whole Internet. Work until now has been focused and limited on utilizing ~11 THz of bandwidth (C and L Band) centred at 193 THz.
Optical networks based on this frequency bands have been able to support up to 230 channels at 50 GHz spacing.

The technology fabricated and tested is based on cascaded arrayed waveguide gratings (AWGs) and is designed to potentially construct a 1600 x 1600 wavelength router that can guide data at the speed of light. Specially designed quantum dot chips are used for light sources.

This single passive optical system can route immense information offering manifold increase from current systems. It can single-handedly interconnect over one million end points while offering at least ten Gb/s per end point. Critically it is also future proof since it's transparent to any communication signal and it can also potentially consume zero power due to its passive nature.

Read the full article at New frontiers in communication systems.
VigLink badge My profile on StackExchange