我正在测试Bootstrap框架(来自Twitter)并尝试在安装Node.js后在本地构建它。它失败了,因为它无法找到较少的模块(我已经安装了&n; 39,npm install -g less'):
C:\Users\geir\code\bootstrap>make
lessc html/less/bootstrap.less > html/css/bootstrap.css
node.js:201
throw e; // process.nextTick error, or 'error' event on first tick
^
Error: Cannot find module 'C:\cygdrive\c\Users\geir\AppData\Roaming\npm\node_modules\less\bin\lessc'
at Function._resolveFilename (module.js:332:11)
at Function._load (module.js:279:25)
at Array.0 (module.js:479:10)
at EventEmitter._tickCallback (node.js:192:40)
Makefile:2: recipe for target `all' failed
make: *** [all] Error 1
它失败的原因是因为" cygdrive \"当make正在寻找模块时,它被预先添加到文件夹层次结构中,我已经验证了thtat' lessc'实际上是在C:\ Users \ geir \ AppData \ Roaming \ npm \ node_modules \ less \ bin \ lessc中找到的,我可以从命令行运行它。
我尝试过以下方法但没有取得任何成功:
任何线索?
答案 0 :(得分:1)
从Cygwin终端拨打电话。打开Cygwin终端,然后cd进入cygwin的C:\ Users \ geir \ code \ bootstrap文件夹别名,然后运行make:
geir@WINHOSTNAME ~
$cd /cygdrive/c/Users/geir/code/bootstrap
geir@WINHOSTNAME /cygdrive/c/Users/geir/code/bootstrap
$make