在node.js中运行Less CSS编译器时出现错误
我已经安装了node.js、npm,少了
node.js版本是v0.5.9-pre
npm 版本是 1.0.10
当我运行任何 lessc
命令时,我收到此错误:
The "sys" module is now called "util". It should have a similar interface. node.js:203 throw e; // process.nextTick error, or 'error' event on first tick ^ Error: require.paths is removed. Use node_modules folders, or the NODE_PATH environment variable instead. at Function. (module.js:376:11) at Object. (/var/www/node/npm/node_modules/less/bin/lessc:7:8) at Module._compile (module.js:432:26) at Object..js (module.js:450:10) at Module.load (module.js:351:31) at Function._load (module.js:310:12) at Array. (module.js:470:10) at EventEmitter._tickCallback (node.js:195:26)
我需要做什么才能使用 lessc 编译器?
I have installed node.js, npm, and less
node.js version is v0.5.9-pre
npm version is 1.0.10
When I run any lessc
command I get this error:
The "sys" module is now called "util". It should have a similar interface. node.js:203 throw e; // process.nextTick error, or 'error' event on first tick ^ Error: require.paths is removed. Use node_modules folders, or the NODE_PATH environment variable instead. at Function. (module.js:376:11) at Object. (/var/www/node/npm/node_modules/less/bin/lessc:7:8) at Module._compile (module.js:432:26) at Object..js (module.js:450:10) at Module.load (module.js:351:31) at Function._load (module.js:310:12) at Array. (module.js:470:10) at EventEmitter._tickCallback (node.js:195:26)
What do I need to do to be able to use the lessc compiler?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这是 v0.5 中的一个变化,lessjs 可能还没有考虑到。使用节点 v0.4.x。
如果您使用 git 安装,请执行以下操作:
现在应该可以正常工作了:)
This is a change in v0.5 that probably lessjs does not take into account yet. Use node v0.4.x.
If you installed using git, do the following:
It should work fine now :)