-
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
Broken on node v6.0.0 #2881
Comments
Less itself does not use any |
That looks like an issue with nodemon, not less |
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. |
This commit replaces the old control flow of exiting the process when an error occurred which swallowed the error in some situations (less#2881). Additionally, it also adds a listener for "unhandledRejection" to also catch errors caused by rejected promises.
I've found the cause: The current published version of Less calls |
They fix two different issues IMO |
So both? (I'm asking because they somewhat overlap and merging both would need some additional editing). |
the other one uses |
@evanlucas Can you describe how this problem with calling |
This commit replaces the old control flow of exiting the process when an error occurred which swallowed the error in some situations (less#2881). Additionally, it also adds a listener for "unhandledRejection" to also catch errors caused by rejected promises.
- directly depend on closure-util; - add Travis tests using node 6 (current) and node 4 (LTS). - depend on a working lessc version: less/less.js#2881
setting process.exitCode does not show a stack trace. Related: nodejs/node#6409 |
Thx for clarifying this. I did not know that One thing though: If |
It is possible to have already flushed by the time the stream is closed. It just isn't a guarantee. That is why there is sometimes (partial) output in the console. |
Confirmed that, at least for us, running in head (which includes ec04a03 ), this gets resolved. |
Using "--source-map" still generates an empty css file for me.. (otherwise working for me). node.js v6.0.0 on windows 8 64-bit. |
… an error occurred which swallowed the error in some situations (less#2881). Additionally, it also adds a listener for "unhandledRejection" to also catch errors caused by rejected promises.
This commit replaces the old control flow of exiting the process when an error occurred which swallowed the error in some situations (less#2881). It also adds process.exitCode = 1 in some error situations that have previously been reported as exitCode = 0. Additionally, it adds a listener for "unhandledRejection" to also catch errors caused by rejected promises.
@ewebdev yep, I can confirm this. With #2891, it throws:
|
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 |
- directly depend on closure-util; - add Travis tests using node 6 (current) and node 4 (LTS). - depend on a working lessc version: less/less.js#2881
Confirm, this breaks with node 6. No error is output :( |
@matthew-dean using ec04a03 works for me (I saw it somewhere around here). |
@lmeyerov @matthew-dean source map is still boken for me, both on head and on ec04a03 =/ |
Btw, even without the error reporting bugfixes, there should be nothing that speaks against releasing a version containing my ec04a03 patch, so that lessc at least works on Node.js v6 as it did before. |
@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. |
That’s the only one that I have encountered, plus the “bug” of not having any real error output in the case of failure. Can’t speak for others, though. |
For some reason, source maps pass all Less tests, but after upgrading, I'm also getting the source map error, and not in a Node 6.0 environment. (Happening in Node 4.) So there's some change that has just broken source maps. |
//cc @nicks |
@matthew-dean Reverting commit 470af20 doesn't solve the source maps issue on my env. |
@matthew-dean sorry! it's just a performance optimization, feel free to revert if it's causing problems and we can try again later |
So much confusion... 😁 Since I've already put some time in it to investigate, let me clarify it:
|
@jhnns Oh, cool, I didn’t see that source map one. If nothing else, one can restore the old Node v5 behaviour by changing |
@jhnns What is the effect of the bug in I merged your PR for error reporting. |
@matthew-dean See #2896 [edit: Nevermind, thanks @matthew-dean] |
@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. |
@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. |
I've created a separate issue. Since the original issue has been resolved, we can close this one. |
@jhnns Sounds good. Thanks for following up. |
Still broke on node v6.9.2 LTS. |
less/less.js#2881 git-svn-id: svn+ssh://svn.freebsd.org/ports/head@439992 35697150-7ecd-e111-bb59-0022644237b5
This commit replaces the old control flow of exiting the process when an error occurred which swallowed the error in some situations (less#2881). It also adds process.exitCode = 1 in some error situations that have previously been reported as exitCode = 0. Additionally, it adds a listener for "unhandledRejection" to also catch errors caused by rejected promises.
- Switches to package-lock.json for supporting modern node - Removes npm-shrinkwrap package, which breaks in npm>3 - Upgrades less.js because of less/less.js#2881
* [deps] Node Upgrade - Switches to package-lock.json for supporting modern node - Removes npm-shrinkwrap package, which breaks in npm>3 - Upgrades less.js because of less/less.js#2881 * [docker] Allow Git remote to be passed via build args * [docker] Break main Dockerfile into npm part separately * [docker] Upgrade postgres image to alpine:3.8
Running
won't output any error and no build file.
Running with
nodemon
yields more info:The text was updated successfully, but these errors were encountered: