1.根據(jù)官網(wǎng)安裝:npm install lighting -gd —registry=https://registry.npm.taobao.org

2.安裝完后測試顯示失?。篹nv:node\r:No such file or directory

3.google搜索答案
見兩個類似問題的鏈接:1、http://stackoverflow.com/questions/20483833/yeoman-returns-env-node-r-no-such-file-or-directory
2、https://github.com/nwjs/nw-builder/issues/75
/usr/local/lib/node_modules/[project_name]/bin/[executing.js] in vim and using the following command ?:set ff=unix
在/usr/local/lib/node_modules/lighting/bin/下使用sudo vim light打開編輯,并在命令行的狀態(tài)輸入如下:“:set ff=unix”。
上面的就是解決方案。一定要切記要在命令行的狀態(tài)下輸入":set ff=unix"