Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit f148324

Browse files
JoeRoblesweaverryan
authored andcommitted
Added node_paths /usr/lib/node_modules REQUIRED
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: '/usr/bin/node' '/tmp/assetic_styluswWvcnS' Error Output: module.js:340 throw err; ^ Error: Cannot find module 'stylus' so, this fixes and finishes my 6 hours quest.
1 parent 18f1a2e commit f148324

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

cookbook/assetic/apply_to_option.rst

Lines changed: 9 additions & 3 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. These default
13+
respectively to ``/usr/bin/coffee``, ``/usr/bin/node`` and ``/usr/lib/node_modules``:
1414

1515
.. configuration-block::
1616

@@ -22,6 +22,7 @@ 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
@@ -30,7 +31,8 @@ respectively to ``/usr/bin/coffee`` and ``/usr/bin/node``:
3031
<assetic:filter
3132
name="coffee"
3233
bin="/usr/bin/coffee"
33-
node="/usr/bin/node" />
34+
node="/usr/bin/node"
35+
node_paths="/usr/lib/node_modules/"/>
3436
</assetic:config>
3537
3638
.. code-block:: php
@@ -41,6 +43,7 @@ respectively to ``/usr/bin/coffee`` and ``/usr/bin/node``:
4143
'coffee' => array(
4244
'bin' => '/usr/bin/coffee',
4345
'node' => '/usr/bin/node',
46+
'node_paths' => '/usr/lib/node_modules/',
4447
),
4548
),
4649
));
@@ -128,6 +131,7 @@ applied to all ``.coffee`` files:
128131
coffee:
129132
bin: /usr/bin/coffee
130133
node: /usr/bin/node
134+
node_paths: [ /usr/lib/node_modules/ ]
131135
apply_to: "\.coffee$"
132136
133137
.. code-block:: xml
@@ -138,6 +142,7 @@ applied to all ``.coffee`` files:
138142
name="coffee"
139143
bin="/usr/bin/coffee"
140144
node="/usr/bin/node"
145+
node_paths="/usr/lib/node_modules/"
141146
apply_to="\.coffee$" />
142147
</assetic:config>
143148
@@ -149,6 +154,7 @@ applied to all ``.coffee`` files:
149154
'coffee' => array(
150155
'bin' => '/usr/bin/coffee',
151156
'node' => '/usr/bin/node',
157+
'node_paths' => '/usr/lib/node_modules/',
152158
'apply_to' => '\.coffee$',
153159
),
154160
),

0 commit comments

Comments
 (0)