From 0a5d70e9eb824421498b38421058382e4c57f278 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ka=20=28Karim=20Cassam=20Chena=C3=AF=29?= Date: Tue, 25 Sep 2018 16:53:56 +0200 Subject: [PATCH 1/2] Update uglifyjs.rst add quick help for common error. Source : https://github.com/nodejs/node-v0.x-archive/issues/3911#issuecomment-8956154 --- frontend/assetic/uglifyjs.rst | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/frontend/assetic/uglifyjs.rst b/frontend/assetic/uglifyjs.rst index 4da6c61e005..51c1399ff11 100644 --- a/frontend/assetic/uglifyjs.rst +++ b/frontend/assetic/uglifyjs.rst @@ -38,6 +38,12 @@ Now you can execute the global ``uglifyjs`` command anywhere on your system: $ uglifyjs --help +If you get the message ``/usr/bin/env: node: No such file or directory``, you just need to symlink it like so + +.. code-block:: terminal + + $ ln -s /usr/bin/nodejs /usr/bin/node + Local Installation ~~~~~~~~~~~~~~~~~~ From 6cf4973e3a701e03d070db80ebe60ef1bb1e7b3b Mon Sep 17 00:00:00 2001 From: Javier Eguiluz Date: Wed, 26 Sep 2018 16:35:59 +0200 Subject: [PATCH 2/2] Reworded the caution message --- frontend/assetic/uglifyjs.rst | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/frontend/assetic/uglifyjs.rst b/frontend/assetic/uglifyjs.rst index 51c1399ff11..7412ed4b148 100644 --- a/frontend/assetic/uglifyjs.rst +++ b/frontend/assetic/uglifyjs.rst @@ -21,6 +21,16 @@ Install UglifyJS UglifyJS is available as a `Node.js`_ module. First, you need to `install Node.js`_ and then, decide the installation method: global or local. +.. caution:: + + Some Linux distributions rename the Node.js binary from ``node`` to ``nodejs``. + This may result in errors like *"/usr/bin/env: node: No such file or + directory"*``. You can solve this problem with a symlink: + + .. code-block:: terminal + + $ ln -s /usr/bin/nodejs /usr/bin/node + Global Installation ~~~~~~~~~~~~~~~~~~~ @@ -38,12 +48,6 @@ Now you can execute the global ``uglifyjs`` command anywhere on your system: $ uglifyjs --help -If you get the message ``/usr/bin/env: node: No such file or directory``, you just need to symlink it like so - -.. code-block:: terminal - - $ ln -s /usr/bin/nodejs /usr/bin/node - Local Installation ~~~~~~~~~~~~~~~~~~