0

I have created a .NetCore 3.1/CRA(Create React App) web app that is running perfectly locally(iis Express).

But when I publish to an IIS 10 server, I get errors like this:

TypeError: t.forEach is not a function
    at oe (react-table.production.min.js:652)
    at react-table.production.min.js:3027
    at Object.mi [as useMemo] (react-dom.production.min.js:3924)
    at Object.t.useMemo (react.production.min.js:399)
    at e.useTable (react-table.production.min.js:3024)
    at ie (GamerProfiles.js:355)
    at Qo (react-dom.production.min.js:3667)
    at Li (react-dom.production.min.js:4293)
    at bu (react-dom.production.min.js:6697)
    at bs (react-dom.production.min.js:6150)

I have upgraded React, npm, and other libraries to the latest.

I am using a library called React-Table and I have that as the latest version too.

It is running great when I run it in Visual Studio locally.

In my publishing profile, I set it to debug hoping that might help make the errors more readable.

But as you can see, it's not very helpful.

Has anyone had any luck debugging an app like this on IIS?

Thanks!

SkyeBoniwell
  • 6,345
  • 12
  • 81
  • 185
  • You build the CRA and then publish on the server? – iunfixit Sep 02 '21 at 14:54
  • @iunfixit When I publish using Visual Studio, it builds everything successfully. I can see the messages in the Visual Studio output window like `npm install`, `npm run build`, etc...and it builds everything successfully, there are no errors during the publishing process. It's just when I try to browse to the site when I see the console errors. – SkyeBoniwell Sep 02 '21 at 15:01
  • 1
    `npm run build` will do minification and other optimizations, you either need to disable it, or send the code to the server and do a `npm start`, take a look at https://stackoverflow.com/questions/55165466/how-to-build-a-production-version-of-react-without-minification – iunfixit Sep 02 '21 at 15:02
  • @iunfixit thanks yes! This is what I'm looking for. I don't want the minification and optimizations right now because it makes it hard to debug. I can turn that back on once I fix the bugs. I will take a look at your link. – SkyeBoniwell Sep 02 '21 at 15:07
  • @SkyeBoniwell Has your problem been solved? – samwu Sep 03 '21 at 07:01
  • @samwu unfortunately no, I still haven't found a way. thanks – SkyeBoniwell Sep 03 '21 at 11:59
  • I suggest you open a case via: https://support.microsoft.com. – samwu Sep 06 '21 at 09:39

0 Answers0