node.js through FastCGI/PHP: Error: Cannot find module 'less' -
node.js through FastCGI/PHP: Error: Cannot find module 'less' -
i installed node.js sources (./configure && create && create install
) under /usr/local/bin/node
. afterwards installed less compiler globally npm -g install less
under /usr/local/lib/node_modules/less/
. node , less located under default paths.
i using kriswallsmith/assetic
compile less files through php, hence adjusted path /usr/local/bin/node
. everytime run script error error: cannot find module 'less'
, had same behavior through command line. found solution (ln -s /usr/local/lib/node_modules/ ~/.node_libraries
) prepare problem , after worked out on command line. through php problem still persists - php running through fastcgi same user used on command line.
how can prepare problem through fastcgi/php too?
constructor of assetic's lessfilter accepts array of nodepaths. adding /usr/local/lib/node_modules/
nodepath solves problem.
php node.js assetic
Comments
Post a Comment