less-watch-compiler'错误:ENOENT:没有这样的文件或目录'在第119行的fs.js

时间:2018-07-30 20:00:52

标签: filesystems less

我对less-watch-compiler有问题。 我的主文件较少,子文件夹中有一些模块。

现在几乎每次我运行less-watch-compiler命令时:

less-watch-compiler /home/username/projectDir/public/less/ /home/username/projectDir/public/css/ --main-file index.less

或:

less-watch-compiler ./public/less/ ./public/css/ --main-file index.less

或:

less-watch-compiler ./public/less/ ./public/css/ index.less

以及任何组合,我都会收到此错误:

监视目录中的文件更改。 fs.js:119     犯错     ^

错误:ENOENT:没有这样的文件或目录,stat'public / less / modules / variables'     在Object.statSync(fs.js:824:3)     在Object.findLessImportsInFile(/usr/lib/node_modules/less-watch-compiler/dist/lib/filesearch.js:13:20)     在Object.fileWatcher(/usr/lib/node_modules/less-watch-compiler/dist/lib/lessWatchCompilerUtils.js:192:38)     在/usr/lib/node_modules/less-watch-compiler/dist/lib/lessWatchCompilerUtils.js:86:40     在/usr/lib/node_modules/less-watch-compiler/dist/lib/lessWatchCompilerUtils.js:67:27     在FSReqWrap.oncomplete(fs.js:159:5)

但是,当我几次重新运行命令时,有趣的是它运行正常。

这是文件结构:

root 
 └──less
 │    └── index.less
 │    └── modules
 |            └── variables.less
 |            └── mixins.less //and other..
 |
 |
 └──css
      └── index.css

和index.less文件的强项:

@import'模块/变量';

@import'modules / mixins';

//和其他进口

添加模块子文件夹后出现问题。

我不知道我要缺少什么,我没有发现任何人遇到这个问题。

先谢谢;)

0 个答案:

没有答案