"Experimental features" warning should be configurable via flag #32192
Replies: 14 comments 3 replies
-
This would be super handy. I may want to disable these on a per feature basis rather than swallowing all warnings. Might we do [in pseudo types]: experimental: {
externalDir: true | {
enabled: true,
silent: true,
},
}; |
Beta Was this translation helpful? Give feedback.
-
I'm curious, what's the purpose of disabling the warning? From my perspective, the whole point of the warning is to make it impossible to start the app without an acknowledgement that you're relying on prerelease features. |
Beta Was this translation helpful? Give feedback.
-
I explicitly acknowledged that I was using an "experimental feature" when I wrote the key I don't need to be reminded of that every time the app starts up in both development and production builds. On top of that, we use the I was already hijacking But, from my perspective, it's a useless message cluttering up my terminal, much akin to the "hundreds of packages have audit issues warnings" you wrote about recently. It's irrelevant to my workflow, and it gets printed every time. (On top of that, the particular "experimental" feature I just enabled is the |
Beta Was this translation helpful? Give feedback.
-
My initial feeling is to err on the side of caution and verbosity. One benefit of the verbose console output is it helps the team understand what experimental features folks are currently opting into, which could explain why they're seeing breaking behavior. Without that, it requires another ask to see their Folks who are using experimental features are the early testers we're looking to provide feedback. I wonder if the root issue here is the particular experimental flag should be considered to be moved to the next stage (maybe still opt-in, not on by default) depending on its usage. |
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
-
What if on the first startup message, there were "shortcodes" for experimental features:
e.g. E = external dirs enabled That might be pushing into "over-optimization" territory and over-complication, but I do agree suppressing these messages would be nice. |
Beta Was this translation helpful? Give feedback.
-
As this seems to be more of a feature request, not an actual bug, I'll convert this to an Idea so the discussion can be continued there. |
Beta Was this translation helpful? Give feedback.
-
These warnings also make CI fail since a non zero return code is sent. It would be awesome to be able to silent these. |
Beta Was this translation helpful? Give feedback.
-
To disable you can comment away the body of the function const experimentalWarning = (0, _utils).execOnce(() => {
//Log.warn(_chalk.default.bold('You have enabled experimental feature(s).'));
//Log.warn(`Experimental features are not covered by semver, and may cause unexpected or broken application behavior. ` + `Use them at your own risk.`);
//console.warn();
}) |
Beta Was this translation helpful? Give feedback.
-
Just weighing in saying we'd also love this. We deploy our NextJS application and having each server spam with this log line is a bit silly to us; can we make it a custom hook or similar? |
Beta Was this translation helpful? Give feedback.
-
We're logging with Datadog and needed to create a filter, but really shouldn't need to. If you want to force that stuff on users, please make it devmode only. |
Beta Was this translation helpful? Give feedback.
-
Any update on this? This is serious issue for me, I'm unable to deploy my application because of that. |
Beta Was this translation helpful? Give feedback.
-
This feature is very helpful to me. Hope some one can pay attention to this issue! |
Beta Was this translation helpful? Give feedback.
-
13.4.19 and dont see any options to disable the warnings |
Beta Was this translation helpful? Give feedback.
-
What version of Next.js are you using?
11.0 (but applies to all)
What version of Node.js are you using?
N/A
What browser are you using?
N/A
What operating system are you using?
N/A
How are you deploying your application?
N/A
Describe the Bug
If the
next.config.js
file contains a key namedexperimental
, Next.js always prints a warning message on startup, like:There is currently no way to disable this warning.
FWIW I searched the existing issues and discussions, and surprisingly did not see an issue covering this topic yet.
Expected Behavior
The warning should be configurable via some kind of an override flag in
next.config.js
, such as:To Reproduce
next.config.js
fileexperimental
with any known experimental flag, per the Next docsBeta Was this translation helpful? Give feedback.
All reactions