Twitter Bootstrap - less.app 编译错误:“EISDIR 对目录进行非法操作”保存时

发布于 2024-12-23 08:49:39 字数 272 浏览 1 评论 0原文

我第一次尝试使用 less css 处理器,但在尝试使用 less.app 保存任何 Twitter Bootstrap .less 文件时收到以下错误:

错误:EISDIR 对目录进行非法操作: '/path/to/less/output/directory'

我仅在 bootstrap.less 文件上设置了输出目录 - 这可能是权限错误吗?

抱歉,如果这很容易 - 任何正确方向的指示将不胜感激。

干杯

I'm trying to get my head around the less css processor for the first time but receive the following error when trying to save any of the Twitter Bootstrap .less files using less.app:

Error: EISDIR illegal operation on a directory: '/path/to/less/output/directory'

I have an output directory set on the bootstrap.less file only - is this a permissions error maybe?

Sorry if this is easy - any pointers in the right direction would be much appreciated.

Cheers

Ben

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

旧伤还要旧人安 2024-12-30 08:49:39

我认为 Less.app 有点让你将 *.less 文件保存在 /less/ 目录中,所以尝试这个结构:

/less/     <-- put all *.less files here
/css/      <-- default output path for compiled *.css files

输出路径可以更改,但我使用这个结构,因为它是一致的,并且每当你在 Less 中添加新项目时都会立即工作。应用程序。

另外,使用 Bootstrap,您只需要编译 boostrap.less 文件(它会导入所有其他文件),因此取消选中应用程序中的其他文件,并确保您的 HTML 仅引用 /css/boostrap.css 文件。

希望这有帮助。

I think Less.app kinda makes you keep *.less files in /less/ dir, so try this structure:

/less/     <-- put all *.less files here
/css/      <-- default output path for compiled *.css files

The output path can be changed, but I use this structure as it's consistent and works instantly whenever you add a new project in Less.app.

Also, with Bootstrap you only need to compile boostrap.less file (it imports all the others), so uncheck the others in the app and make sure your HTML references just the /css/boostrap.css file.

Hope this helps.

撩心不撩汉 2024-12-30 08:49:39

我遇到了同样的问题,是一个小细节,当您在控制台中使用 lessc 进行编译时,您也必须指定输出文件,而不仅仅是文件夹。

lessc app.less ../css/app.css

I had the same problem, was a little detail, when you compile with lessc in console you must specified the output file too not only the folder.

lessc app.less ../css/app.css
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文