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
With last update I am now getting lots of logging during the build. #480
Comments
That's expected. Is it logged many times or just one? |
I now get about 20 of this messages when I start dev or build |
ouch! Can you make a simple test repo that I can clone and try quickly? If there is a bug it should be fairly easy to fix it |
It's just a nextjs app. I can put together a demo repo next week I think. But as far as I know I am not doing anything custom with styled-jsx except extracting the css in one place to be able to send a css blob to my cms. |
yeah but I don't have a lot of free time recently. So it'd be great if you could set up a repo and integrate a styled-jsx plugin and add a few styles so that I can clone and start to debug right away. |
I added a little stack trace to each of the invocations. It looks like babel loads it fresh each time:
|
I am thinking maybe just remove the log message :) |
I have the same issue with styled-jsx 3.0.2, these lines are printed 142 times altogether:
How can we disable these logs? |
Can you prepare a minimal next.js app and wire up a plugin so that I can debug? It should load those only once |
I use Gatsby, and the issue is not systematic, I can't reproduce it reliably so far. I'm running a currently private version based off this template, where I've upgraded all dependencies to latest (except react-icons latest I think, not compatible with Gatsby v1): Also, even if it is only printed once, I would still like to be able to disable these info messages. Could that please be added? Here's a screenshot I took at one point... |
This reproduces the issue for me:
This shows the same as in the image above. |
Bump. I get a wall of logs and Im not even using Next.js |
Getting this on a lot of my repos as well. Nothing but a massive wall of |
The log is in
This function is called inside |
Plugins are supposed to be cached so should only load once: But for some reason it's not working. Maybe some concurrency involved? |
|
Also of note (this may be a separate issue), when I run |
Bump, This is making build status unreadable |
There's a pull request (#518) up that fixes this. Looks like it'll be merged once approved and released shortly after. @giuseppeg any ETA on release? |
@eliasthompson I'll try to get this out today or tomorrow |
Just released 3.1.1 which includes this fix. If you are using Next.js you will have to wait for this to be merged and a new version of canary to be released vercel/next.js#5617 |
I just upgraded to 3.1.1, and I'm still getting the excessive log output. Not using Next; just plain Webpack with |
oh boy :) @atombender can you put a sample repo together? |
@giuseppeg Here. Output:
Looks like one gets a new Node 10.11.0. |
@atombender thanks! It seems that the issue in your case is caused by the |
@giuseppeg It happens here, in {
"sassOptions": {"includePaths": ["./src/styles"]},
"babel": {
"location": {
"start": {"line": 10, "column": 20},
"end": {"line": 14, "column": 9}
},
"vendorPrefixes": true,
"sourceMaps": false,
"isGlobal": false,
"filename": "/Users/alex/Trash/styledtestcase/src/Thing2.jsx"
}
} If I comment out the |
@atombender great thank you! This is definitely an issue with the sass plugin now. It shouldn't push the same directory multiple times and probably only push new "base" directories. I think that if |
I can work on a PR, but this might be a breaking change, if people have accidentally used relative imports. For example, |
Why not just remove the log? I don't see that it's very useful anyway. |
@ricardo-cantu that doesn't solve the real issue. We should fix the behavior above first and then we can discuss about removing the log message if it is still annoying. @atombender I created an issue on the plugin repo giuseppeg/styled-jsx-plugin-sass#27 |
The update is great and works for me after a clean |
👋 friend. Welcome to styled-jsx and thanks for contributing!
If you need help or have a question about styled-jsx please ask it on Spectrum https://spectrum.chat/styled-jsx or join our Slack community at https://zeit.chat and ask it in the
#next
channel.Before you open a new issue please take a look at our Frequent Asked Questions and open issues.
Remember, often time asking in chat or looking at the FAQ/issues can be faster than waiting for us to reply to a new issue*.
If you are here to report a bug or request a feature please remove this introductory section and fill out the information below!
Do you want to request a feature or report a bug?
Small bug
What is the current behavior?
During build I get notifications of plugins loaded:
If the current behavior is a bug, please provide the steps to reproduce and possibly a minimal demo or testcase in the form of a Next.js app, CodeSandbox URL or similar
What is the expected behavior?
No additional logging
Environment (include versions)
Did this work in previous versions?
Yes worked fine prior to the last update and it's not a fatal issue, but kind of annoying.
The text was updated successfully, but these errors were encountered: