Jade报错:Invalid indentation,you can use tabs or spaces but not both问题
2013-08-14 18:43
549 查看
现象:通过html生成jade文件之后,更改jade文件时,语句没什么问题的情况下,jade文件编译不通过,报错:Invalid indentation,you can use tabs or spaces but not both。
原因:错误信息上已经写得很清楚了,是因为jade文件里出现了多余的空格导致文件编译不通过。
解决方法:在代码编辑器中设置tab替换空格,就ok了。本人用的webstorm,在webstorm中设置方法如下:preference->Code Style->jade->Tabs and Indents->勾选Use Tab charactor。就可以了。
然后,点 view->Active Editor->Show Whitespaces,这样就很方便地查看哪里的空格有问题了。或者直接在preference里面设置:preference->Editor->Appearance->勾选Show whitespaces
PS:
有时候报错信息不准确的,虽然报的是A.jade文件的错误,但是不是A文件有问题,而是B文件有问题。大家智取吧。
原因:错误信息上已经写得很清楚了,是因为jade文件里出现了多余的空格导致文件编译不通过。
解决方法:在代码编辑器中设置tab替换空格,就ok了。本人用的webstorm,在webstorm中设置方法如下:preference->Code Style->jade->Tabs and Indents->勾选Use Tab charactor。就可以了。
然后,点 view->Active Editor->Show Whitespaces,这样就很方便地查看哪里的空格有问题了。或者直接在preference里面设置:preference->Editor->Appearance->勾选Show whitespaces
PS:
有时候报错信息不准确的,虽然报的是A.jade文件的错误,但是不是A文件有问题,而是B文件有问题。大家智取吧。
相关文章推荐
- Jade报错:Invalid indentation,you can use tabs or spaces but not both问题
- Jade报错:Invalid indentation,you can use tabs or spaces but not both
- quartz使用时遇到的问题Bean property 'xxx' is not writable or has an invalid setter method. Did you mean 'xxx
- Posts Tagged ‘This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register问题的解决办法
- Cannot connect to WMI provider.You do not have permission or the server is unreachable.Note that you can only manager SQL Server 2005 and later version with SQL Server Configuration Manager.Invalid namespace [0x8004100e]
- 闪屏页面开发遇到的问题you need to use a theme.appcompat theme (or descendant)
- ADB not responding. You can wait more,or kill"abd.exe“。。。。。
- TabError: Inconsistent use of tabs and spaces in indentation
- 导入新的sld时出现问题The repository root is invalid or not accessible
- Recover a file even if it was not committed but it has to have been added when you use git reset head by mistake.
- 项目报错“JavaServer Faces 2.2 can not be installed : One or more constraints”等一系列问题
- Why-can-I-rename-or-move-an-open-file-in-Linux-but-not-in-Windows
- rails reverse words you can't use them in as your column or tablename
- 闪屏页面开发遇到的问题you need to use a theme.appcompat theme (or descendant)
- TabError: Inconsistent use of tabs and spaces in indentation
- 奇葩问题:This file could not be checked in because the original version of the file on the server was moved or deleted. A new version of this file has been saved to the server, but your check-in comments were not saved
- 关于You need to use a Theme.AppCompat theme (or descendant) with this activity的问题
- android问题记录:You need to use a Theme.AppCompat theme (or descendant) with this
- 项目报错“JavaServer Faces 2.2 can not be installed : One or more constraints”等一系列问题
- 闪屏页面开发遇到的问题you need to use a theme.appcompat theme (or descendant)