Skip to content

Broken on node v6.0.0 #2881

Closed
Closed

Description

@zigomir

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

Activity

  1. seven-phases-max commented on Apr 27, 2016

    @seven-phases-max
    Member

    Less itself does not use any ObjectTemplate.Set function, so it's probably one of its dependencies. There's long chain of dependency updates in the current master so it's hard to tell yet how difficult it may be to get v6-compatible release. Feel free to investigate it yourself deeper and suggest a patch/PR.

  2. evanlucas commented on Apr 27, 2016

    @evanlucas

    That looks like an issue with nodemon, not less

  3. macinjosh32 commented on Apr 27, 2016

    @macinjosh32

    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.

  4. added a commit that references this issue on Apr 27, 2016
  5. jhnns commented on Apr 27, 2016

    @jhnns
    Contributor

    I've found the cause:

    The current published version of Less calls path.dirname() with undefined which throws an error with node v6. This has already been addressed by ec04a03 but not published yet. The error is not thrown because the current implementation of lessc swallows all errors caused by Less itself. I've created a PR to fix this.

  6. seven-phases-max commented on Apr 27, 2016

    @seven-phases-max
    Member

    So, emm, which one to merge? #2882 or #2884? :)

  7. evanlucas commented on Apr 27, 2016

    @evanlucas

    They fix two different issues IMO

  8. seven-phases-max commented on Apr 27, 2016

    @seven-phases-max
    Member

    So both? (I'm asking because they somewhat overlap and merging both would need some additional editing).

  9. evanlucas commented on Apr 27, 2016

    @evanlucas

    the other one uses process.exit() directly, which should be avoided to prevent not flushing stdout/stderr

  10. jhnns commented on Apr 28, 2016

    @jhnns
    Contributor

    @evanlucas Can you describe how this problem with calling process.exit() directly can be reproduced? I definitely agree with you that process.exit() should be used in rare cases because usually it's better to terminate it regularly or by throwing an error. In this case, however, I think process.exit() with an error code is more appropriate, because we don't want to show a stack trace for expected errors. And it also seems weird to me to continue execution but prevent further processing with a flag (like it is currently implemented).

  11. added a commit that references this issue on Apr 28, 2016
  12. added a commit that references this issue on Apr 28, 2016
  13. evanlucas commented on Apr 28, 2016

    @evanlucas

    setting process.exitCode does not show a stack trace. process.exit() does not actually flush process.stdout or process.stderr (and they are both non-blocking). You should only have to explicitly call it in rare cases. Otherwise, close all of your handles and the event loop will close on it's own, which will cause the process to exit.

    Related: nodejs/node#6409

  14. jhnns commented on Apr 28, 2016

    @jhnns
    Contributor

    Thx for clarifying this. I did not know that process.exit() is non-blocking. I'm going to update my PR asap.

    One thing though: If process.exit() did not flush process.stdout – why is there an output in my console? 😁

  15. 27 remaining items

  16. addaleax commented on May 9, 2016

    @addaleax
    Contributor

    @jhnns Oh, cool, I didn’t see that source map one.

    If nothing else, one can restore the old Node v5 behaviour by changing path.basename(output) to path.basename(output || 'undefined');… I guess the whole block there can be skipped for output === undefined, though.

  17. matthew-dean commented on May 9, 2016

    @matthew-dean
    Member

    @jhnns What is the effect of the bug in bin/lessc. Is it a critical bug? Does Less still complete? What is the result? Can you file a specific issue for this bug with more details?

    I merged your PR for error reporting.

  18. claar commented on May 9, 2016

    @claar

    @matthew-dean See #2896

    [edit: Nevermind, thanks @matthew-dean]

  19. matthew-dean commented on May 9, 2016

    @matthew-dean
    Member

    @ewebdev If you are still having an issue on Less 2.7.1, can you file a separate issue with more details?

    @claar That is a separate issue (the first one on @jhnns's list), which has been addressed. The second item is a separate bug, and @ewebdev's is a separate bug. They need to be separated from this issue for clarity.

  20. matthew-dean commented on May 9, 2016

    @matthew-dean
    Member

    @nicks It happens. You wouldn't be the first. If you can help us add tests so we can detect source maps not working in the future, that would be much appreciated.

    Btw, as a general FYI, Less's dev support is a bit slim right now (one of our major contributors had to step back because of family responsibilities), so we would definitely welcome Less developers getting involved on an organizational level. You can contact me separately if you have questions.

  21. jhnns commented on May 10, 2016

    @jhnns
    Contributor

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

  22. matthew-dean commented on May 10, 2016

    @matthew-dean
    Member

    @jhnns Sounds good. Thanks for following up.

  23. johngerome commented on Dec 21, 2016

    @johngerome

    Still broke on node v6.9.2 LTS.
    Nothings happen when runing lessc

  24. added a commit that references this issue on Jul 16, 2018
  25. added a commit that references this issue on Jul 19, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions