如果是windows系统的话,在wr后面加上--exec
你的PHP文件在浏览器打开可以是正常网页预览吗 ,也就是你装有PHP本地环境没有 在环境里应该是没有问题的
将单引号改为双引号。
进来看看。
浏览器F12-齿轮-Enable CSS source maps 底下的Auto-reload generated CSS没有勾选?
您好,可能是 node 版本导致的,可以尝试使用 nvm 工具修改 node 版本。谢谢!
将双引号改为单引号这个问题可以解决。
wr工具此时执行的是spawn,需要执行的是exec,正确的代码为:wr --exec "lessc duang.less duang.css" duang.less。详解如下:
exec:
the command will not be parsed, as will be run as given
should handle i/o redirection shell operators
stdout and stderr output will be buffered until the command is complete
spawn:
the command will be parsed into space separated tokens, probably misinterpreting any quotes you have in your command
will not handle i/o redirection shell operators
stdout and stderr output will not be buffered
详解来源:https://www.npmjs.com/package/wr
wr 参数后面跟的命令使用双引号引起来的,试试这样:
wr "lessc duang.less duang.css" duang.les