Skip to content

Commit 85f608f

Browse files
committed
Added node_paths /usr/lib/node_modules REQUIRED
I proposed this patch for branch 2.2 and is already patched symfony@f148324, please apply to branch 2.3 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.
1 parent 2458f83 commit 85f608f

File tree

1 file changed

+12
-5
lines changed

1 file changed

+12
-5
lines changed

cookbook/assetic/apply_to_option.rst

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ as you'll see here, files that have a specific extension. To show you how
99
to handle each option, let's suppose that you want to use Assetic's CoffeeScript
1010
filter, which compiles CoffeeScript files into Javascript.
1111

12-
The main configuration is just the paths to coffee and node. These default
13-
respectively to ``/usr/bin/coffee`` and ``/usr/bin/node``:
12+
The main configuration is just the paths to coffee, node and node_modules.
13+
+An example configuration might look like this:
1414

1515
.. configuration-block::
1616

@@ -22,15 +22,18 @@ respectively to ``/usr/bin/coffee`` and ``/usr/bin/node``:
2222
coffee:
2323
bin: /usr/bin/coffee
2424
node: /usr/bin/node
25+
node_paths: [ /usr/lib/node_modules ]
2526
2627
.. code-block:: xml
2728
2829
<!-- app/config/config.xml -->
2930
<assetic:config>
30-
<assetic:filter
31+
<assetic:filter
3132
name="coffee"
32-
bin="/usr/bin/coffee"
33-
node="/usr/bin/node" />
33+
bin="/usr/bin/coffee/"
34+
node="/usr/bin/node/">
35+
<assetic:node-paths>/usr/lib/node_modules</assetic:node-paths>
36+
</assetic:filter>
3437
</assetic:config>
3538
3639
.. code-block:: php
@@ -41,6 +44,7 @@ respectively to ``/usr/bin/coffee`` and ``/usr/bin/node``:
4144
'coffee' => array(
4245
'bin' => '/usr/bin/coffee',
4346
'node' => '/usr/bin/node',
47+
'node_paths' => array('/usr/lib/node_modules'),
4448
),
4549
),
4650
));
@@ -128,6 +132,7 @@ applied to all ``.coffee`` files:
128132
coffee:
129133
bin: /usr/bin/coffee
130134
node: /usr/bin/node
135+
node_paths: [ /usr/lib/node_modules ]
131136
apply_to: "\.coffee$"
132137
133138
.. code-block:: xml
@@ -139,6 +144,7 @@ applied to all ``.coffee`` files:
139144
bin="/usr/bin/coffee"
140145
node="/usr/bin/node"
141146
apply_to="\.coffee$" />
147+
<assetic:node-paths>/usr/lib/node_modules</assetic:node-paths>
142148
</assetic:config>
143149
144150
.. code-block:: php
@@ -149,6 +155,7 @@ applied to all ``.coffee`` files:
149155
'coffee' => array(
150156
'bin' => '/usr/bin/coffee',
151157
'node' => '/usr/bin/node',
158+
'node_paths' => '/usr/lib/node_modules',
152159
'apply_to' => '\.coffee$',
153160
),
154161
),

0 commit comments

Comments
 (0)