Skip to content
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

Compiling empty less file causes the map to contain string "undefined" #2430

Closed
OJezu opened this issue Feb 2, 2015 · 1 comment · Fixed by #2439 or #2637
Closed

Compiling empty less file causes the map to contain string "undefined" #2430

OJezu opened this issue Feb 2, 2015 · 1 comment · Fixed by #2439 or #2637
Labels

Comments

@OJezu
Copy link

OJezu commented Feb 2, 2015

The following:
lessc empty.less --source-map=test.map out.css
where "empty.less" is, well, empty (0 bytes) causes test.map to have following content:

undefined

Same happens if "empty.less" produces no css, e.g. has only variable definitions.
Possibly related: #1491 and gulp-community/gulp-less#121 - very strange error that comes from following line:
return new Buffer(str).toString('base64')
from lib/less-node/environment.js
When str === undefined new Buffer throws. At first glance seems that the reason str is undefined is the same as that "undefined" gets written to map file.

Less version: less@2.3.1

@yatskevich
Copy link

Looks like there is a regression in 2.5.0.

root@ba0c79b2ec1b:~# nodejs --version
v0.10.25
root@ba0c79b2ec1b:~# npm --version
1.3.10
root@ba0c79b2ec1b:~# lessc --version
lessc 2.5.0 (Less Compiler) [JavaScript]
root@ba0c79b2ec1b:~# lessc empty.less --source-map=empty.css.map empty.css

empty.css.map contains undefined.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
4 participants