less.js: Broken on node v6.0.0

Running

lessc main.less build.css

won’t output any error and no build file.

Running with nodemon yields more info:

› nodemon -e less --exec 'lessc src/main.less build.css'
(node) v8::ObjectTemplate::Set() with non-primitive values is deprecated
(node) and will stop working in the next major release.

==== JS stack trace =========================================

Security context: 0x36610d2c9fa9 <JS Object>#0#
    1: .node [module.js:568] [pc=0x1aa0081d0f64] (this=0x225da61d89b9 <an Object with map 0x7af7e117be1>#1#,module=0x2666c00042f1 <a Module with map 0x7af7e1181b9>#2#,filename=0x2666c0004251 <String[136]: /Users/zigomir/.nvm/versions/node/v6.0.0/lib/node_modules/nodemon/node_modules/fsevents/lib/binding/Release/node-v48-darwin-x64/fse.node>)
    2: load [module.js:456] [pc=0x1aa008138e72] (this=0x2666c00042f1 <a Module with map 0x7af7e1181b9>#2#,filename=0x2666c0004251 <String[136]: /Users/zigomir/.nvm/versions/node/v6.0.0/lib/node_modules/nodemon/node_modules/fsevents/lib/binding/Release/node-v48-darwin-x64/fse.node>)
    3: tryModuleLoad(aka tryModuleLoad) [module.js:415] [pc=0x1aa00813899d] (this=0x36610d204189 <undefined>,module=0x2666c00042f1 <a Module with map 0x7af7e1181b9>#2#,filename=0x2666c0004251 <String[136]: /Users/zigomir/.nvm/versions/node/v6.0.0/lib/node_modules/nodemon/node_mo 1: v8::Template::Set(v8::Local<v8::Name>, v8::Local<v8::Data>, v8::PropertyAttribute)
 2: fse::FSEvents::Initialize(v8::Local<v8::Object>)
 3: node::DLOpen(v8::FunctionCallbackInfo<v8::Value> const&)
 4: v8::internal::FunctionCallbackArguments::Call(void (*)(v8::FunctionCallbackInfo<v8::Value> const&))
 5: v8::internal::MaybeHandle<v8::internal::Object> v8::internal::(anonymous namespace)::HandleApiCallHelper<false>(v8::internal::Isolate*, v8::internal::(anonymous namespace)::BuiltinArguments<(v8::internal::BuiltinExtraArguments)1>)
 6: v8::internal::Builtin_HandleApiCall(int, v8::internal::Object**, v8::internal::Isolate*)
 7: 0x1aa00800961b
 8: 0x1aa0081d0f64
(node) v8::ObjectTemplate::Set() with non-primitive values is deprecated
(node) and will stop working in the next major release.

==== JS stack trace =========================================

Security context: 0x36610d2c9fa9 <JS Object>#0#
    1: .node [module.js:568] [pc=0x1aa0081d0f64] (this=0x225da61d89b9 <an Object with map 0x7af7e117be1>#1#,module=0x2666c00042f1 <a Module with map 0x7af7e1181b9>#2#,filename=0x2666c0004251 <String[136]: /Users/zigomir/.nvm/versions/node/v6.0.0/lib/node_modules/nodemon/node_modules/fsevents/lib/binding/Release/node-v48-darwin-x64/fse.node>)
    2: load [module.js:456] [pc=0x1aa008138e72] (this=0x2666c00042f1 <a Module with map 0x7af7e1181b9>#2#,filename=0x2666c0004251 <String[136]: /Users/zigomir/.nvm/versions/node/v6.0.0/lib/node_modules/nodemon/node_modules/fsevents/lib/binding/Release/node-v48-darwin-x64/fse.node>)
    3: tryModuleLoad(aka tryModuleLoad) [module.js:415] [pc=0x1aa00813899d] (this=0x36610d204189 <undefined>,module=0x2666c00042f1 <a Module with map 0x7af7e1181b9>#2#,filename=0x2666c0004251 <String[136]: /Users/zigomir/.nvm/versions/node/v6.0.0/lib/node_modules/nodemon/node_mo 1: v8::Template::Set(v8::Local<v8::Name>, v8::Local<v8::Data>, v8::PropertyAttribute)
 2: fse::FSEvents::Initialize(v8::Local<v8::Object>)
 3: node::DLOpen(v8::FunctionCallbackInfo<v8::Value> const&)
 4: v8::internal::FunctionCallbackArguments::Call(void (*)(v8::FunctionCallbackInfo<v8::Value> const&))
 5: v8::internal::MaybeHandle<v8::internal::Object> v8::internal::(anonymous namespace)::HandleApiCallHelper<false>(v8::internal::Isolate*, v8::internal::(anonymous namespace)::BuiltinArguments<(v8::internal::BuiltinExtraArguments)1>)
 6: v8::internal::Builtin_HandleApiCall(int, v8::internal::Object**, v8::internal::Isolate*)
 7: 0x1aa00800961b
 8: 0x1aa0081d0f64

About this issue

  • Original URL
  • State: closed
  • Created 8 years ago
  • Reactions: 11
  • Comments: 41 (23 by maintainers)

Commits related to this issue

Most upvoted comments

Seeing the same. Running lessc on any trivial .less file ouputs no build file and no errors under Node.js v6, even in verbose mode.

@addaleax Less 2.7.0 is released (just now). Which bugs are still outstanding? I should add that as a “known bug” to this release.

I’ve created a separate issue. Since the original issue has been resolved, we can close this one.

So much confusion… 😁

Since I’ve already put some time in it to investigate, let me clarify it:

  • ec04a03f1cba3a092d5cd7f7c5d8e28bb43c1932 fixes a bug in bin/lessc where an undefined path was passed to dirname. This has now been published, everything’s fine 👍
  • There is still a bug in bin/lessc, where an undefined path is passed to basename. Just run lessc --source-map-map-inline some-file.less and less will emit nothing to stdout. There is no PR for this bug yet. I’ve tried to fix this, but since there are no tests for lessc and there are so many different options, I was not confident enough to not break anything else… 😞
  • Both bugs were not reported to the user (e.g. like presenting a stack trace or a non-zero exit code). This is fixed by my PR which is still pending.

I would be ok to open a PR that fixes this, but I’m not sure what source map options are supported in which situations, e.g. when the output is process.stdout. This code is a bit complicated and probably requires some refactoring…