Or copy link
If you’re working on a React admin dashboard project like perfume-admin-panel and facing build or deployment issues, this guide will help you solve them step by step.
Common issues when deploying React projects:
error:0308010C:digital envelope routines::unsupported
Make sure your package.json contains the correct versions:
"dependencies": { "react": "^18.x", "react-dom": "^18.x", "react-router-dom": "^6.30.2", "@supabase/supabase-js": "^2.x", }, "devDependencies": { "react-scripts": "^5.0.1", "tailwindcss": "^4.x", "autoprefixer": "^10.x" }
Important: Remove conflicting packages like next if you are using react-scripts to build a CRA-style project.
npm uninstall next
Problem: Navigate not exported from react-router-dom .
Solution: Ensure you are using React Router v6, where Navigate is available.
npm list react-router-dom
npm uninstall react-router-dom npm install react-router-dom@6
import { BrowserRouter, Routes, Route, Navigate, Outlet } from "react-router-dom";
When building on Node v17+ / v20+, you may get:
Fix: Set the environment variable:
export NODE_OPTIONS=--openssl-legacy-provider
Then run the build command:
npm install npm run build
Options -MultiViews RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^ index.html [L]
If you want to test locally:
npm install export NODE_OPTIONS=--openssl-legacy-provider npm run build npx serve -s build
# 1. Remove conflicting Next.js dependency npm uninstall next # 2. Install react-scripts if missing npm install react-scripts --save-dev # 3. Set Node.js legacy OpenSSL mode export NODE_OPTIONS=--openssl-legacy-provider # 4. Install dependencies npm install # 5. Build the project npm run build
After these steps:
Conclusion
By removing Next.js, fixing Node.js OpenSSL errors, ensuring react-router-dom v6, and properly building the project, you can deploy your perfume-admin-panel React app without errors.
If you use MySQL or MariaDB, you might have encountered...
7 cPanel Settings You Must Change Right Now For 3X Fast...
cPanel Essential Guide: Master Web Hosting Management w...
Save my name, email, and website in this browser for the next time I comment.