Closed kandebr closed 6 years ago
Any solution to this?
sorry guys, sorry @JedWatson i reverted this in https://github.com/JedWatson/react-input-autosize/pull/125
Breaking my builds :( any ETA on PR?
the problem continues #124
@moersoy are you reporting that this is still an issue, or just linking #124? this was closed automatically when that PR was merged, and should be fixed with 2.2.1
I made the 2.2.1 update, the problem continues. Since the window is undefined it will not provide the next condition.
const isIE = (typeof window !== 'undefined' && window.navigator) ? /MSIE |Trident\/|Edge\//.test(window.navigator.userAgent) : false;
I think it should be this way
(typeof window !== 'undefined') && ((typeof window.navigator !== 'undefined') ? /MSIE |Trident\/|Edge\//.test(window.navigator.userAgent) : false )
@moersoy are you using react-select release candidate, or some other package that has react-input-autosize as a dependency? The code which you quoted above is correct, but your npm/yarn lockfile could specify an older version of react-input-autosize. If that is the situation, you can try removing the lockfile and reinstalling dependencies again, or simply reinstalling react-select.
@clearjs I am using React-select on Nextjs (with ssr). I use on Azure Services. Every time I deploy it, I delete everything and reinstaling it. So always has the latest version. I am taking this error on azure.My project is not working properly due to this error on Azure
@moersoy You may want to try checking which version is actually installed. If you'd like to ensure that the code above is correct, just execute typeof window !== 'undefined' && window.navigator ? "browser" : "server"
and typeof xxx !== 'undefined' && xxx.navigator ? "browser" : "server"
(xxx
here emulates the undefined window
on server) in any browser console (or node).
Your lockfile may be included with your source code, still pointing to an older version.
Yes, both have the same result. react-select has not been updated.
@moersoy ^2.1.2 matches any minor version updates (including 2.2.1). Only lockfile may prevent installing a newer version.
https://github.com/JedWatson/react-input-autosize/blob/18842d386f5fbad23c888bf45cb2b9e1f29e0010/src/AutosizeInput.js#L39
Unfortunately it leads to error on server-side..