Franpastoragusti / oidc-react-app

Oidc Client implementation with React Context and react-router-dom, to manage the auth process and manage private and public routes
43 stars 23 forks source link

Getting error while starting app #13

Open AppBankDigital opened 4 years ago

AppBankDigital commented 4 years ago

When i try to run the reactjs app using npm start command and getting error below. I also added .env file.

TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received type undefined at validateString (internal/validators.js:125:11) at Object.join (path.js:1147:7) at noopServiceWorkerMiddleware (/Users/p0s01qm/OneDriveLocal/reactportal/oidc-react-app/node_modules/react-dev-utils/noopServiceWorkerMiddleware.js:14:26) at Layer.handle [as handle_request] (/Users/p0s01qm/OneDriveLocal/reactportal/oidc-react-app/node_modules/express/lib/router/layer.js:95:5) at trim_prefix (/Users/p0s01qm/OneDriveLocal/reactportal/oidc-react-app/node_modules/express/lib/router/index.js:317:13) at /Users/p0s01qm/OneDriveLocal/reactportal/oidc-react-app/node_modules/express/lib/router/index.js:284:7 at Function.process_params (/Users/p0s01qm/OneDriveLocal/reactportal/oidc-react-app/node_modules/express/lib/router/index.js:335:12) at next (/Users/p0s01qm/OneDriveLocal/reactportal/oidc-react-app/node_modules/express/lib/router/index.js:275:10) at launchEditorMiddleware (/Users/p0s01qm/OneDriveLocal/reactportal/oidc-react-app/node_modules/react-dev-utils/errorOverlayMiddleware.js:20:7) at Layer.handle [as handle_request] (/Users/p0s01qm/OneDriveLocal/reactportal/oidc-react-app/node_modules/express/lib/router/layer.js:95:5) at trim_prefix (/Users/p0s01qm/OneDriveLocal/reactportal/oidc-react-app/node_modules/express/lib/router/index.js:317:13) at /Users/p0s01qm/OneDriveLocal/reactportal/oidc-react-app/node_modules/express/lib/router/index.js:284:7 at Function.process_params (/Users/p0s01qm/OneDriveLocal/reactportal/oidc-react-app/node_modules/express/lib/router/index.js:335:12) at next (/Users/p0s01qm/OneDriveLocal/reactportal/oidc-react-app/node_modules/express/lib/router/index.js:275:10) at handleWebpackInternalMiddleware (/Users/p0s01qm/OneDriveLocal/reactportal/oidc-react-app/node_modules/react-dev-utils/evalSourceMapMiddleware.js:42:7) at Layer.handle [as handle_request] (/Users/p0s01qm/OneDriveLocal/reactportal/oidc-react-app/node_modules/express/lib/router/layer.js:95:5)

cnadolny2s commented 4 years ago

I get the exact same error. I have also added my .env file and set all env variables accordingly. Can you please check that? @Franpastoragusti

visen9 commented 4 years ago

yarn upgrade --latest

@AppBankDigital, @cnadolny2s You're right, there are some issues on these external library versions. If you update them, you'll solve the problem.

saleeb commented 2 years ago

to fix this issue replace "react-scripts": "^3.x.x" with "react-scripts": "^3.4.1" and remove node_modules then npm install again it will work Regards