Open kissu12345 opened 4 years ago
It means there is wrong path and in Route in App.js Compare your code with mine to fix the issue
On Fri, Jun 12, 2020 at 12:11 PM kissu12345 notifications@github.com wrote:
backend server started but frontend not working iam getting this error in localhost browser kindly give suggesstion.
TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received undefined at validateString (internal/validators.js:121:11) at Object.join (path.js:375:7) at noopServiceWorkerMiddleware (C:\Users\kishan and vijji\Desktop\node-react-ecommerce-master\frontend\node_modules\react-dev-utils\noopServiceWorkerMiddleware.js:14:26) at Layer.handle [as handle_request] (C:\Users\kishan and vijji\Desktop\node-react-ecommerce-master\frontend\node_modules\express\lib\router\layer.js:95:5) at trim_prefix (C:\Users\kishan and vijji\Desktop\node-react-ecommerce-master\frontend\node_modules\express\lib\router\index.js:317:13) at C:\Users\kishan and vijji\Desktop\node-react-ecommerce-master\frontend\node_modules\express\lib\router\index.js:284:7 at Function.process_params (C:\Users\kishan and vijji\Desktop\node-react-ecommerce-master\frontend\node_modules\express\lib\router\index.js:335:12) at next (C:\Users\kishan and vijji\Desktop\node-react-ecommerce-master\frontend\node_modules\express\lib\router\index.js:275:10) at launchEditorMiddleware (C:\Users\kishan and vijji\Desktop\node-react-ecommerce-master\frontend\node_modules\react-dev-utils\errorOverlayMiddleware.js:20:7) at Layer.handle [as handle_request] (C:\Users\kishan and vijji\Desktop\node-react-ecommerce-master\frontend\node_modules\express\lib\router\layer.js:95:5) at trim_prefix (C:\Users\kishan and vijji\Desktop\node-react-ecommerce-master\frontend\node_modules\express\lib\router\index.js:317:13) at C:\Users\kishan and vijji\Desktop\node-react-ecommerce-master\frontend\node_modules\express\lib\router\index.js:284:7 at Function.process_params (C:\Users\kishan and vijji\Desktop\node-react-ecommerce-master\frontend\node_modules\express\lib\router\index.js:335:12) at next (C:\Users\kishan and vijji\Desktop\node-react-ecommerce-master\frontend\node_modules\express\lib\router\index.js:275:10) at handleWebpackInternalMiddleware (C:\Users\kishan and vijji\Desktop\node-react-ecommerce-master\frontend\node_modules\react-dev-utils\evalSourceMapMiddleware.js:42:7) at Layer.handle [as handle_request] (C:\Users\kishan and vijji\Desktop\node-react-ecommerce-master\frontend\node_modules\express\lib\router\layer.js:95:5)
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/basir/node-react-ecommerce/issues/44, or unsubscribe https://github.com/notifications/unsubscribe-auth/AATUFQ4TABJ4SYTR4V3FDCTRWHL33ANCNFSM4N4CVUPA .
iam tried to run ur code also it showed same error how to resolve this how to change path in app.js
share App.js please
import React from 'react'; import { BrowserRouter, Route, Link } from 'react-router-dom' import './App.css'; import HomeScreen from './screens/HomeScreen1'; import ProductScreen from './screens/ProductScreen1'; import CartScreen from './screens/CartScreen'; import SigninScreen from './screens/SigninScreen'; import { useSelector } from 'react-redux'; import RegisterScreen from './screens/RegisterScreen'; import ProductsScreen from './screens/ProductsScreen'; import ShippingScreen from './screens/ShippingScreen'; import PaymentScreen from './screens/PaymentScreen'; import PlaceOrderScreen from './screens/PlaceOrderScreen'; import OrderScreen from './screens/OrderScreen'; import ProfileScreen from './screens/ProfileScreen'; import OrdersScreen from './screens/OrdersScreen';
function App() {
const userSignin = useSelector(state => state.userSignin); const { userInfo } = userSignin;
const openMenu = () => { document.querySelector(".sidebar").classList.add("open"); } const closeMenu = () => { document.querySelector(".sidebar").classList.remove("open") } return (
); }
export default App;
iam nt able to send app.js file
You need to update your react-scripts. See: https://github.com/basir/node-react-ecommerce/issues/32#issuecomment-640289110
Also(this is unrelated) if you want to see the products you will need to import the data into MongoDB in the appropriate JSON format. If it doesn't already exist create an amazona database. Then either create a products collection or just create it automatically by importing. Be sure to remove the id field from the JSON objects in your json file before importing so MongoDB can assign its own ids.
hello there I just updated the run locally docs. check it now to fix the issue: https://github.com/basir/node-react-ecommerce#run-locally
backend server started but frontend not working iam getting this error in localhost browser kindly give suggesstion.
TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received undefined at validateString (internal/validators.js:121:11) at Object.join (path.js:375:7) at noopServiceWorkerMiddleware (C:\Users\kishan and vijji\Desktop\node-react-ecommerce-master\frontend\node_modules\react-dev-utils\noopServiceWorkerMiddleware.js:14:26) at Layer.handle [as handle_request] (C:\Users\kishan and vijji\Desktop\node-react-ecommerce-master\frontend\node_modules\express\lib\router\layer.js:95:5) at trim_prefix (C:\Users\kishan and vijji\Desktop\node-react-ecommerce-master\frontend\node_modules\express\lib\router\index.js:317:13) at C:\Users\kishan and vijji\Desktop\node-react-ecommerce-master\frontend\node_modules\express\lib\router\index.js:284:7 at Function.process_params (C:\Users\kishan and vijji\Desktop\node-react-ecommerce-master\frontend\node_modules\express\lib\router\index.js:335:12) at next (C:\Users\kishan and vijji\Desktop\node-react-ecommerce-master\frontend\node_modules\express\lib\router\index.js:275:10) at launchEditorMiddleware (C:\Users\kishan and vijji\Desktop\node-react-ecommerce-master\frontend\node_modules\react-dev-utils\errorOverlayMiddleware.js:20:7) at Layer.handle [as handle_request] (C:\Users\kishan and vijji\Desktop\node-react-ecommerce-master\frontend\node_modules\express\lib\router\layer.js:95:5) at trim_prefix (C:\Users\kishan and vijji\Desktop\node-react-ecommerce-master\frontend\node_modules\express\lib\router\index.js:317:13) at C:\Users\kishan and vijji\Desktop\node-react-ecommerce-master\frontend\node_modules\express\lib\router\index.js:284:7 at Function.process_params (C:\Users\kishan and vijji\Desktop\node-react-ecommerce-master\frontend\node_modules\express\lib\router\index.js:335:12) at next (C:\Users\kishan and vijji\Desktop\node-react-ecommerce-master\frontend\node_modules\express\lib\router\index.js:275:10) at handleWebpackInternalMiddleware (C:\Users\kishan and vijji\Desktop\node-react-ecommerce-master\frontend\node_modules\react-dev-utils\evalSourceMapMiddleware.js:42:7) at Layer.handle [as handle_request] (C:\Users\kishan and vijji\Desktop\node-react-ecommerce-master\frontend\node_modules\express\lib\router\layer.js:95:5)