Recently I pushed my project to Gitlab so I could also work on it on my laptop to practise my React.
After I pulled and npm installed everything (had to use npm audit fix --force which was weird) I tried to run it. Everything looked fine but the images wont show up and when I inspect it, it says [object Module]. Now I have googled it and most answers say something about changing the options to
options: {
esModule: false,
},
in webpack
The thing is, I think I never worked with webpack and on my desktop it works fine (I don't have a webpack.config.js). This is my package.json which is the same as on my laptop:
{
"name": "test",
"version": "0.1.0",
"private": true,
"dependencies": {
"@testing-library/jest-dom": "^4.2.4",
"@testing-library/react": "^9.3.2",
"@testing-library/user-event": "^7.1.2",
"axios": "^0.19.2",
"bootstrap": "^4.5.0",
"cors": "^2.8.5",
"node-sass": "^4.14.1",
"react": "^16.13.1",
"react-dom": "^16.13.1",
"react-scripts": "3.4.1",
"react-select": "^3.1.0"
},
"scripts": {
"start": "react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test",
"eject": "react-scripts eject"
},
"eslintConfig": {
"extends": "react-app"
},
"browserslist": {
"production": [
">0.2%",
"not dead",
"not op_mini all"
],
"development": [
"last 1 chrome version",
"last 1 firefox version",
"last 1 safari version"
]
},
"devDependencies": {}
}