Skip to content

Commit

Permalink
Added node_paths /usr/lib/node_modules REQUIRED
Browse files Browse the repository at this point in the history
I was testing, testing and testing one and another method or posibility, until I reached that page: kriswallsmith/assetic#185 that opened my eyes, and one value was missing:

node_paths /usr/lib/node_modules

I continously received:
[exception] 500 | Internal Server Error | Assetic\Exception\FilterException
[message] An error occurred while running:
&symfony#39;/usr/bin/node&symfony#39; &symfony#39;/tmp/assetic_styluswWvcnS&symfony#39;
Error Output:
module.js:340
throw err;
^
Error: Cannot find module &symfony#39;stylus&symfony#39;

so, this fixes and finishes my 6 hours quest.
  • Loading branch information
JoeRobles authored and weaverryan committed Jul 18, 2013
1 parent 18f1a2e commit f148324
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions cookbook/assetic/apply_to_option.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ as you'll see here, files that have a specific extension. To show you how
to handle each option, let's suppose that you want to use Assetic's CoffeeScript
filter, which compiles CoffeeScript files into Javascript.

The main configuration is just the paths to coffee and node. These default
respectively to ``/usr/bin/coffee`` and ``/usr/bin/node``:
The main configuration is just the paths to coffee, node and node_modules. These default
respectively to ``/usr/bin/coffee``, ``/usr/bin/node`` and ``/usr/lib/node_modules``:

.. configuration-block::

Expand All @@ -22,6 +22,7 @@ respectively to ``/usr/bin/coffee`` and ``/usr/bin/node``:
coffee:
bin: /usr/bin/coffee
node: /usr/bin/node
node_paths: [ /usr/lib/node_modules/ ]
.. code-block:: xml
Expand All @@ -30,7 +31,8 @@ respectively to ``/usr/bin/coffee`` and ``/usr/bin/node``:
<assetic:filter
name="coffee"
bin="/usr/bin/coffee"
node="/usr/bin/node" />
node="/usr/bin/node"
node_paths="/usr/lib/node_modules/"/>
</assetic:config>
.. code-block:: php
Expand All @@ -41,6 +43,7 @@ respectively to ``/usr/bin/coffee`` and ``/usr/bin/node``:
'coffee' => array(
'bin' => '/usr/bin/coffee',
'node' => '/usr/bin/node',
'node_paths' => '/usr/lib/node_modules/',
),
),
));
Expand Down Expand Up @@ -128,6 +131,7 @@ applied to all ``.coffee`` files:
coffee:
bin: /usr/bin/coffee
node: /usr/bin/node
node_paths: [ /usr/lib/node_modules/ ]
apply_to: "\.coffee$"
.. code-block:: xml
Expand All @@ -138,6 +142,7 @@ applied to all ``.coffee`` files:
name="coffee"
bin="/usr/bin/coffee"
node="/usr/bin/node"
node_paths="/usr/lib/node_modules/"
apply_to="\.coffee$" />
</assetic:config>
Expand All @@ -149,6 +154,7 @@ applied to all ``.coffee`` files:
'coffee' => array(
'bin' => '/usr/bin/coffee',
'node' => '/usr/bin/node',
'node_paths' => '/usr/lib/node_modules/',
'apply_to' => '\.coffee$',
),
),
Expand Down

0 comments on commit f148324

Please sign in to comment.