I get this error when I try to deploy to Heroku :
[eslint] Failed to load config "airbnb" to extend from. remote: Referenced from: /tmp/build_b7392388/client/.eslintrc.json
I have a client-server architecture that looks like this:
And in detail it looks like this:
Client part contains .eslintrc.json but the server part (root folder) does not.
Here is package.json from server (root folder):
{
"proxy": "http://localhost:3001",
"name": "emoteco_nodejs",
"version": "1.0.0",
"description": "",
"main": "index.js",
"homepage": ".",
"scripts": {
"start": "node server/index.js",
"build": "cd client && npm install && npm run build",
"test": "echo \"Error: no test specified\" && exit 1"
},
"engines": {
"node": "14.17.5"
},
"keywords": [],
"author": "",
"license": "ISC",
"dependencies": {
"applicationinsights": "^2.3.0",
"axios": "^0.27.2",
"azure-storage": "^2.10.7",
"express": "^4.17.2",
"gm": "^1.23.1",
"image-data-uri": "^2.0.1",
"jsonwebtoken": "^8.5.1",
"mongodb": "^4.2.2",
"multer": "^1.4.5-lts.1",
"node-cron": "^3.0.0",
"node-html-to-image": "^3.2.4",
"nodemailer": "^6.7.7",
"react-validation": "^3.0.7",
"validator": "^13.7.0"
},
"devDependencies": {
"sass": "^1.52.1"
}
}
Here is package.json from client (sub folder):
{
"name": "emotecoapp",
"version": "2.0.1",
"private": true,
"author": "Creative Tim",
"license": "See license in https://www.creative-tim.com/license",
"description": "Otis Kit PRO by Creative Tim",
"homepage": "",
"bugs": {
"url": "https://github.com/creativetimofficial/ct-otis-kit-pro/issues"
},
"repository": {
"type": "git",
"url": "git+https://github.com/creativetimofficial/ct-otis-kit-pro.git"
},
"engines": {
"node": "14 || 15 || 16",
"npm": ">=6"
},
"dependencies": {
"@emotion/cache": "11.7.1",
"@emotion/react": "11.9.0",
"@emotion/styled": "11.8.1",
"@mui/icons-material": "5.6.2",
"@mui/material": "5.6.4",
"@mui/styled-engine": "5.6.1",
"@testing-library/jest-dom": "5.16.4",
"@testing-library/react": "13.2.0",
"@testing-library/user-event": "14.1.1",
"@types/jest": "^29.2.0",
"@types/node": "^18.11.7",
"@types/react": "^18.0.24",
"@types/react-dom": "^18.0.8",
"axios": "^1.1.3",
"chroma-js": "2.4.2",
"flatpickr": "4.6.13",
"onnxjs": "^0.1.8",
"prop-types": "15.8.1",
"react": "18.1.0",
"react-copy-to-clipboard": "5.1.0",
"react-countup": "6.2.0",
"react-dom": "18.1.0",
"react-flatpickr": "3.10.11",
"react-native-pytorch-core": "^0.2.2",
"react-router-dom": "6.3.0",
"react-scripts": "5.0.1",
"react-syntax-highlighter": "15.5.0",
"react-webcam": "^7.0.1",
"rellax": "1.12.1",
"swiper": "7.3.4",
"typed.js": "2.0.12",
"typescript": "^4.8.4",
"uuid": "8.3.2",
"web-vitals": "2.1.4"
},
"scripts": {
"start": "react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test",
"eject": "react-scripts eject",
"install:clean": "rm -rf node_modules/ && rm -rf package-lock.json && npm install && npm start"
},
"browserslist": {
"production": [
">0.2%",
"not dead",
"not op_mini all"
],
"development": [
"last 1 chrome version",
"last 1 firefox version",
"last 1 safari version"
]
},
"devDependencies": {
"eslint": "^8.2.0",
"eslint-config-airbnb": "19.0.4",
"eslint-config-airbnb-base": "^15.0.0",
"eslint-config-prettier": "8.5.0",
"eslint-plugin-import": "^2.25.2",
"eslint-plugin-jsx-a11y": "6.5.1",
"eslint-plugin-prettier": "4.0.0",
"eslint-plugin-react": "7.29.4",
"eslint-plugin-react-hooks": "4.5.0",
"prettier": "2.6.2"
}
}
I have tried several solutions like:
1.
npm install -g install-peerdeps
install-peerdeps --dev eslint-config-airbnb
install-peerdeps --dev eslint-config-airbnb-base
It didn't work.
2. I also tried to change the setting.json of the VScode workspace like this:
{
"eslint.workingDirectories": [
"./client"
]
}
It didn't work as well
I have tried most of suggested solutions on internet but nothing works on my case.
Do you have any idea how I can solve my issue?