Open jdnarvaez opened 8 months ago
Reproduced:
@MiloWang2048 can you list out some steps to show how to reproduce the issue? are you talking about the production build on nextui or on your application using nextui? if possible, please also share a sandbox environment for demonstration.
@wingkwong any time there is a warning generated this happens because of the code I pasted above.
https://github.com/nextui-org/nextui/blob/canary/packages/utilities/shared-utils/src/console.ts#L11
@jdnarvaez Sorry. Can you provide detailed steps on how to reproduce the issue or even a sandbox? I still don't get how to reproduce it.
@wingkwong you just have to have a next UI component throw a warning and it will display this error. the problem is that process
is not defined in a browser context, so that line I linked to is invalid. Whatever bundler you are using needs to extract process
to its appropriate transpiled variable.
Can you share which components you used for producing the warning and error? Some sample code would be appreciated.
I'll have to see if I have time outside of work to reproduce this, I cannot share anything from work that we use this library in
I linked to the line of problematic code, process.env
is not defined in a browser. Your bundling scheme should extract this to an injected variable, and it clearly is not doing that.
NextUI Version
2.2.9
Describe the bug
it looks like the wrapped
console.ts
utility referencesprocess
even after a production build which results in console errors:Your Example Website or App
No response
Steps to Reproduce the Bug or Issue
Trigger a warning in NextUI by supplying an invalid prop in a production build
Expected behavior
I would expect that
process.env
would be transpiled away or conditionally chained such that it does not cause errors in the logScreenshots or Videos
No response
Operating System Version
macOS
Browser
Chrome