-
Notifications
You must be signed in to change notification settings - Fork 3.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Relative Path issue with less.js #1238
Comments
yes that was introduced in 1.3.1 I suspect the above will work if you compile serverside with node, which is recommended, but it is still a bug. |
I have a very similar issue, possibly the same one with 1.4.0b. I have the following directory structure:
Style.less contains the following: @import "../Content/other"; This correctly resolves with 1.3.3 but with 1.4.0b I get the following error (using in Visual Studio through ASP.NET and Web Tools 2012.2): "Error LESS: 'd:/Users\Projects../Content/other.less' wasn't found (404) d:\Users\Projects\style.less" Notice how the relative path is not resolved and that forward and backward slashes are used mixed up. Possibly related? #1272 |
Well it seems the issue lies within how the parser was invoked by ASP.NET and Web Tools indeed and when I fixed that I didn't even have problems with the default 1.4.0b! I apologize for the confusion, it seems this is not an issue with less.js. See the description of the rather strange issue here: http://forums.asp.net/p/1900852/5371528.aspx/1?p=True&t=635022256782196589 |
That is weird, are you sure this fixes the problem? Do you know what's the value of |
I know it's weird :-). Yes, I've no problems so far. |
closing since the pull request was merged, think that resolves the issues here |
I'm not sure. My pull request fixed an issue with "undefined" added to the start of the url. This is a different, but somehow related issue. I think this https://github.com/cloudhead/less.js/blob/master/lib/less/browser.js#L227 |
@reggi The problem is that it doesn't recognise |
Unfortunately, relative paths are still a problem in LESS and the bug has not been solved (see above issues). Are there any plans to work on this? |
@4DiGITS The issues crosslinked above are not related to this one actually. In short the problem is: " |
|
Here's my directory structure
bootstrap.less
looks like thisIt
@import
s each piece of bootstrap from the components folder. It's using relative the relative url with../
to jump out of the current directory followed bycomponents/
to go into components.The
style.less
file contains something like this.Which
@import
s this sibling fileboostrap.less
.For some reason all of this isn't playing nicely with
less.js
The path:
http://reggi.dev/reggi.com/assets/stylesheets/components/bootstrap/less/reset.less
Should be
http://reggi.dev/reggi.com/assets/components/bootstrap/less/reset.less
I found this ticket that has SalimBensiali's less.js which didn't cause this error.
The problem with his version is that it's
1.3.0
which apparently doesn't support this which is in bootstrap:The text was updated successfully, but these errors were encountered: