Не могу запустить react / node js приложение на прод сервере. Подскажите, пожалуйста
При запуске команды npm run build каждый раз выходит эта ошибка. И локально, и на сервере, если пробую сделать deploy приложения. Самое непонятное, я проверил все свои файлы sass, нигде не вижу, чтобы использовалась переменная в функции calc(), как на stack overflow.
Что еще можно проверить / сделать, чтобы устранить ошибку? Подскажите, пожалуйста, может, кто-то сталкивался с подобной проблемой? Как найти файл, что создает проблему?
Проверял бутстраповские файлы, которые подключаются к стилям в индексе реакт приложения, там тоже нет переменных в функции calc. Очень нужно выпустить приложение на продукцию.
Ошибка
Lexical error on line 1: Unrecognized text.
Erroneous area:
1: .25rem - 0 !important
^.............^
CompileError: Begins at CSS selector undefined
package.json file для сервера
{
"name": "databases",
"version": "1.0.0",
"description": "",
"engines": {
"node": "14.x",
"npm": "6.x",
"yarn": "1.x"
},
"main": "index.js",
"scripts": {
"start": "node index.js",
"server": "nodemon index.js",
"client":"npm run start --prefix client",
"heroku-postbuild": "NPM_CONFIG_PRODUCTION=false npm install --prefix client && npm run build --prefix client"
},
"author": "",
"license": "ISC",
"dependencies": {
"bcrypt": "^5.0.1",
"body-parser": "^1.19.0",
"cookie-parser": "^1.4.5",
"cors": "^2.8.5",
"express": "^4.17.1",
"express-session": "^1.17.2",
"multer": "^1.4.3",
"mysql": "^2.18.1",
"nodemailer": "^6.6.3",
"nodemon": "^2.0.12"
}
}
package.json file для клиента
{
"name": "firebase-react-auth",
"version": "0.1.0",
"private": true,
"engines": {
"node": "14.x",
"npm": "6.x",
"yarn": "1.x"
},
"dependencies": {
"3d-react-carousal": "^4.0.2",
"antd": "^4.16.9",
"axios": "^0.21.1",
"bootstrap": "^4.5.2",
"chart.js": "^3.5.1",
"cors": "^2.8.5",
"file-saver": "^2.0.5",
"firebase": "^7.24.0",
"html-pdf": "^3.0.1",
"ityped": "^1.0.3",
"jquery": "^3.6.0",
"lodash": "^4.17.21",
"material-design-icons": "^3.0.1",
"material-ui-icons": "^1.0.0-beta.36",
"materialize-css": "^1.0.0-rc.2",
"node-sass": "^4.14.1",
"react": "^16.13.1",
"react-bootstrap": "^1.3.0",
"react-bootstrap-table-next": "^4.0.3",
"react-bootstrap-table2-paginator": "^2.1.2",
"react-dom": "^16.13.1",
"react-redux": "^7.2.5",
"react-redux-firebase": "^3.10.0",
"react-router-dom": "^5.2.0",
"react-scripts": "3.4.3",
"react-speech-recognition": "^3.9.0",
"react-world-flags": "^1.4.0",
"redux-devtools-extension": "^2.13.9",
"redux-firestore": "^0.15.0",
"sass-loader": "^11.1.1",
"slick-carousel": "^1.8.1",
"styled-components": "^5.3.0",
"three": "^0.133.0",
"tsparticles": "^1.32.0",
"web-vitals": "^1.0.1"
},
"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"
]
}
}
при запуске npm start все работает нормально
у тебя проблема с селектором в css, как тут json поможет?