Hi,
I'm currently building a React application using Parse as the backend. The application is server side rendered, so on the initial render (happening on the server side) the process logs the following warning (as per this line):
It looks like you're using the browser version of the SDK in a node.js environment. You should require('parse/node') instead.
One solution to prevent that would be to check in the same line if a process.env variable exists, for example process.env.SSR !== true.
Happy to send a PR if this makes sense.
Sure, I can understand there are cases where the warning isn't useful, and should be capable of being hidden.
SSR sounds a bit too obscure, let's be verbose with process.env.SERVER_RENDERING and just check its truthiness (so users can run SERVER_RENDERING=1 node server.js). Happy to accept a PR.
PR done !
btw, when I try to do import Parse from 'parse/node' I get dependency error

@johhansantana those are all modules that ship as part of Node.js, and none of them are dependencies of Parse. You should look at your other code to see what's attempting to pull them in.
Most helpful comment
Sure, I can understand there are cases where the warning isn't useful, and should be capable of being hidden.
SSRsounds a bit too obscure, let's be verbose with process.env.SERVER_RENDERING and just check its truthiness (so users can runSERVER_RENDERING=1 node server.js). Happy to accept a PR.