lessc binary not available after installing less via NPM

末鹿安然 提交于 2019-11-28 18:36:31

When you install LESS via npm use the -g option to install it globally.

npm install -g less

When installing packages with npm you have two options:

  1. Install them globally: npm install -g <package>
  2. Install locally in your home directory under ~/.npm: npm install <package>

If you choose option 1 your system should be able to locate the binary lessc. If you choose option 2 you should add ~/.npm/less/path_to_bin_directory to your path:

export PATH=~/.npm/less/path_to_bin_directory:$PATH

or better, if a ~/node_modules directory has been created as a result of installation:

export PATH=~/node_modules/less/path_to_bin_directory:$PATH
标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!