I have a webapp created using ReactJS in production. After adding a new feature, I am getting the following error Error: Minified React error #130; visit http://facebook.github.io/react/docs/error-decoder.html?invariant=130&args[]=undefined&args[]= for the full message or use the non-minified dev environment for full errors and additional helpful warnings
When I click the link, this is the summarized error message:
Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: undefined.
This feature works on the local instance, it is when I deploy on the server, the error pops up.
I did not create this project from scratch, I took over from someone else. In the project root, there is a file called .env.development (on my local instance) whereas the codebase on the server has a file called .env
I am not sure if this is of any significance, just wanted give out all the details.
In order to create the production build, I used the following command sudo npm run build
This are my build scripts in package.json:
"scripts": {
"start": "react-app-rewired start",
"build": "react-app-rewired --max_old_space_size=8192 build",
"test": "react-app-rewired test --env=jsdom",
"eject": "react-scripts eject"
}
This is the config-overrides.js
module.exports = function override(config, env) {
if (env === 'production') {
config.devtool = false;
}
return config;
};
I want to know how to get the full error which would make the error easier to debug.