You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Not sure there is any template for reporting a bug.
Loading my application in a server which is not running Node. And in the Chrome DevTool, the react-window stop working because the process is not defined.
It will be better not to assume process is predefined in the environment. And it's not defined, it should be always in production mode?
Please let me know if it need more info for it. Or I can push a PR to adjust this issue.
The text was updated successfully, but these errors were encountered:
process.env.NODE_ENV is a convention which usually works on node out of the box and requires replacing for browser. Webpack uses definePlugin for this and do it out of the box according set mode: "production" | "development". Rollup uses rollup-plugin-replace for this.
So you need to bundle your app before running on server. Or manually specify
global.process={env: {NODE_ENV: 'production'// or development}}
@TrySound's comment is spot on. If enough people mention hitting this snag, I'll update the README. 😄 For now, I'll just tag it as a question!
It will be better not to assume process is predefined in the environment
I think I see where you're coming from, but from a practical standpoint– I think it's reasonable to rely on the process.env convention given that the most tooling automatically manages this.
I start the conversation because the environment variable is given from the service in the application. Secondly, the build system in the application is quite outdated. It's not convenient to use existing tool like webpack or rollup to mange.
The workaround is to manually create a global variable and assign it to the process.env.NODE_ENV. I feel that it's a bit duplicated since there is global AppContext in the app manage the environment variable. That's why I am asking this question.
It's fine to close it. It's a bit hack for the limited flexibility build system to use this library.
Not sure there is any template for reporting a bug.
Loading my application in a server which is not running Node. And in the Chrome DevTool, the react-window stop working because the process is not defined.
It will be better not to assume process is predefined in the environment. And it's not defined, it should be always in production mode?
Please let me know if it need more info for it. Or I can push a PR to adjust this issue.
The text was updated successfully, but these errors were encountered: