I deployed an app on Ubuntu VPS. When I start the app using pm2, I got this error:
Module not found: Can't resolve 'react-is' in '/root/apps/eduxxi-meeting/client/node_modules/styled-components/dist'
This is the package.json for my project:
{
"name": "client",
"version": "0.1.0",
"private": true,
"proxy": "http://localhost:8000",
"dependencies": {
"@testing-library/jest-dom": "^4.2.4",
"@testing-library/react": "^9.3.2",
"@testing-library/user-event": "^7.1.2",
"react": "^16.13.1",
"react-dom": "^16.13.1",
"react-router-dom": "^5.3.0",
"react-scripts": "3.4.1",
"simple-peer": "^9.11.0",
"socket.io-client": "^4.3.2",
"styled-components": "^5.3.3",
"uuid": "^8.3.2"
},
"scripts": {
"start": "GENERATE_SOURCEMAP=false react-scripts start",
"build": "GENERATE_SOURCEMAP=false 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"
]
}
}
I start the app like this:
pm2 start npm --name "eduxxi-meeting-ui" -- run start
What have I missed? I appreciate any help :)