okta / samples-js-react

React Auth SDK sample
Other
174 stars 257 forks source link

Issues on npm start from base project location #302

Open sanj52 opened 1 year ago

sanj52 commented 1 year ago

I am facing below error on cmd npm start so am i missing something or the npm version needs to be different. As for now I am using npm version 9.5.1. The error are: PS D:\NOW_OR_NEVER\REACT\ReactWorkspace\samples-js-react-master> npm install

@okta/samples-js-react@3.0.0 postinstall npm install --prefix custom-login && npm install --prefix okta-hosted-login

npm ERR! code 1 npm ERR! path D:\NOW_OR_NEVER\REACT\ReactWorkspace\samples-js-react-master npm ERR! command failed npm ERR! command C:\WINDOWS\system32\cmd.exe /d /s /c npm install --prefix custom-login && npm install --prefix okta-hosted-login
npm ERR! npm ERR! code 1 npm ERR! npm ERR! path D:\NOW_OR_NEVER\REACT\ReactWorkspace\samples-js-react-master npm ERR! npm ERR! command failed

denysoblohin-okta commented 1 year ago

What is your Windows version? Have you tried to install project on Linux Bash Shell for Windows or Cygwin?

sanj52 commented 1 year ago

I am in windows 10 and tried running in git bash as well with nom install command in base project but got same issues.

shuowu-okta commented 1 year ago

@sanj52 Have you tried run script separately, I believe && should be the cause. Meanwhile, we will update the script to support Windows platform.

sanj52 commented 1 year ago

Yep I did but no luck!!!

denysoblohin-okta commented 1 year ago

Could you post npm error log? What errors do you get on running npm install --prefix custom-login?

As a workaround you can try:

cd custom-login
npm install --force
cd ..
cd okta-hosted-login
npm install --force
cd ..
npm start
sanj52 commented 1 year ago

Same issue and error as well.

denysoblohin-okta commented 1 year ago

Internal ref: OKTA-620750