You might have a pathing issue. It looks like you installed less to
~/node_modules and are running your app from ~/less_files. Node is might
be looking for less globally in /usr/local/lib/node_modules/ or locally in
~/less_files/node_modules/ and not finding it in either.
Try removing the ~/node_modules folder to install modules properly when
your projects are in sub-folders of ~/ like ~/less_files is.
-- JamesOR
On Wednesday, May 9, 2012 3:02:27 PM UTC-4, TheSpiff wrote:
>
>
> # test of less bin
> xxx@xxx:~/less_files$ lessc test.less > out.css
>
> node.js:249
> throw e; // process.nextTick error, or 'error' event on first tick
> ^
> Error: Cannot find module 'less'
> at Function._resolveFilename (module.js:333:15)
> at Function._load (module.js:280:25)
> at Module.require (module.js:357:17)
> at require (module.js:373:17)
> at Object. (/usr/bin/lessc:7:12)
> at Module._compile (module.js:444:26)
> at Object..js (module.js:462:10)
> at Module.load (module.js:351:32)
> at Function._load (module.js:309:12)
> at module.js:482:10
>
> # test of less within node console
> xxx@xxx:~/less_files$ node
> > var less = require('less');
> undefined
> >
>
> # install via apt-get
> …[some items omitted]
> Reading package lists... Done
> Building dependency tree
> Reading state information... Done
> node-less is already the newest version.
> 0 upgraded, 0 newly installed, 0 to remove and 26 not upgraded.
>
>
> # install via npm (also did -g install)
> ~$ npm install less
> npm http GET https://registry.npmjs.org/less
> npm http 200 https://registry.npmjs.org/less
> npm http GET https://registry.npmjs.org/less/-/less-1.3.0.tgz
> npm http 200 https://registry.npmjs.org/less/-/less-1.3.0.tgz
> [email protected] ./node_modules/less
>
> I'm fairly new to node and less, so any direction would be great!
>
--
Job Board: http://jobs.nodejs.org/
Posting guidelines:
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You received this message because you are subscribed to the Google
Groups "nodejs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en