Repository navigation
Closed
Labels
Description
Running
lessc main.less build.csswon'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
Reacted by maddin, Eckhart Arnold, Mathias Dannesbo, Christopher C, Thomas Salzinger, Daniel W. Hieber and Matteo Capucci
Reacted by Moszeed, Kristofer Giltvedt Selbekk, lmeyerov and Alexander M. Turek
Activity
seven-phases-max commentedon Apr 27, 2016
Less itself does not use any
ObjectTemplate.Setfunction, 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 getv6-compatible release. Feel free to investigate it yourself deeper and suggest a patch/PR.evanlucas commentedon Apr 27, 2016
That looks like an issue with nodemon, not less
macinjosh32 commentedon Apr 27, 2016
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.
Fix error reporting of lessc executable
jhnns commentedon Apr 27, 2016
I've found the cause:
The current published version of Less calls
path.dirname()withundefinedwhich 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 oflesscswallows all errors caused by Less itself. I've created a PR to fix this.seven-phases-max commentedon Apr 27, 2016
So, emm, which one to merge? #2882 or #2884? :)
evanlucas commentedon Apr 27, 2016
They fix two different issues IMO
seven-phases-max commentedon Apr 27, 2016
So both? (I'm asking because they somewhat overlap and merging both would need some additional editing).
evanlucas commentedon Apr 27, 2016
the other one uses
process.exit()directly, which should be avoided to prevent not flushing stdout/stderrjhnns commentedon Apr 28, 2016
@evanlucas Can you describe how this problem with calling
process.exit()directly can be reproduced? I definitely agree with you thatprocess.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 thinkprocess.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).Fix error reporting of lessc executable
Add compatibility with node 6 / npm 3
evanlucas commentedon Apr 28, 2016
setting process.exitCode does not show a stack trace.
process.exit()does not actually flushprocess.stdoutorprocess.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
jhnns commentedon Apr 28, 2016
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 flushprocess.stdout– why is there an output in my console? 😁27 remaining items
addaleax commentedon May 9, 2016
@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)topath.basename(output || 'undefined');… I guess the whole block there can be skipped foroutput === undefined, though.matthew-dean commentedon May 9, 2016
@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.
claar commentedon May 9, 2016
@matthew-dean See #2896
[edit: Nevermind, thanks @matthew-dean]
matthew-dean commentedon May 9, 2016
@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.
matthew-dean commentedon May 9, 2016
@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.
jhnns commentedon May 10, 2016
I've created a separate issue. Since the original issue has been resolved, we can close this one.
matthew-dean commentedon May 10, 2016
@jhnns Sounds good. Thanks for following up.
johngerome commentedon Dec 21, 2016
Still broke on node v6.9.2 LTS.
Nothings happen when runing lessc
Fix lessc after breakage by node 6 update.
Fix lessc after breakage by node 6 update.
Fix lessc after breakage by node 6 update.
Fix error reporting of lessc executable
[deps] Node Upgrade
Node Upgrade (#73)