Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Cookbook][Assetic][Apply filter] Added node_paths /usr/lib/node_modules REQUIRED #2775

Closed
wants to merge 2 commits into from

Conversation

JoeRobles
Copy link
Contributor

I was trying, trying and trying one and another method or posibility, until I reached that page: kriswallsmith/assetic#185 that opened my eyes, one option 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.

I'm using YAML configuration, not tested on XML nor PHP. If you had, please comment.

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.
@@ -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/',
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'node_paths' => array('/usr/lib/node_modules/'),

?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's right, is a collection of node paths, as said, not tested on PHP, for those using PHP configuration, please comment.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JoeRobles the PHP configuration works in a similar way than the Yaml one. So you should indeed pass an array

@weaverryan
Copy link
Member

Hi Joe!

Nice addition! I've patched this into the 2.2 branch at sha: f148324 and sha: 6fe4510 and I made a small change at sha: fa63586.

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants