Hi there, I am struggling with this issue for a couple of days already, I only get this error when I build for production, local environment works fine.
This is the file generated by the build
https://justpaste.it/98pyw
And this is the piece of code that fails:
if (this instanceof a3) {
return Reflect.construct(f2, arguments, this.constructor);
}`
The error
app-CQaiJHst.js:9445 Uncaught TypeError: Function has non-object prototype 'undefined' in instanceof check
at [Symbol.hasInstance] (<anonymous>)
at Function.a3 (app-CQaiJHst.js:9445:16)
at app-CQaiJHst.js:9788:21
The vite.config file (for debugging purpose, I switched off minimized files)
Note: paste the vite.config file here was a pain, that's why I add an external link with the code.
Node version in prod and local environments (remote server and local v16.17.0 I already tried to upgrade and downgrade the node versions but I always got the same error/result)
I also remove the node_modules many times reinstalling them, but nothing changes. I think the error is caused by vite when builds for production, but I have not clue how to fix it.
Any clue?
Thanks
Top comments (1)
Hi there, finally I found a solution , I posted here:
stackoverflow.com/questions/790090...