Closed tusharbudhe0302 closed 6 years ago
@tusharbudhe0302: Looks like the mock-server hasn't been started. As noted in the quickstart, you can start it by running:
npm run mock-okta
Yes try that too. It's showing some proxy error.
Tapes stored in: C:\TFS\nodejs-okta-api\tools\mock-okta\tapes Server started: http://127.0.0.1:7777 Proxying: http://rain.okta1.com:1802 events.js:183 throw er; // Unhandled 'error' event ^
Error: listen EADDRINUSE :::7777
at Object._errnoException (util.js:1024:11)
at _exceptionWithHostPort (util.js:1046:20)
at Server.setupListenHandle [as _listen2] (net.js:1351:14)
at listenInCluster (net.js:1392:12)
at Server.listen (net.js:1476:7)
at Object.node tools/mock-okta
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the @okta/samples-nodejs-express-4@3.0.0 mock-okta script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in: npm ERR! C:_logs\2017-12-29T14_32_59_478Z-debug.log
Looks like this is throwing an error because the port is in use.
Try the following:
# -- For Windows ---
# Find the pid of the process
netstat -ano | findstr :7777
# Kill the connection
tskill {pid}
# -- Other ---
kill $( lsof -i:7777 -t )
Then, restart it:
# Start the mock server
npm run mock-okta
# In another terminal
npm start
I did as you suggested. Now I am getting different exception. I am using windows7
npm start
@okta/samples-nodejs-express-4@3.0.0 prestart C:\nodejs-okta-api build-frontend
'DIST_OUT' is not recognized as an internal or external command, operable program or batch file. child_process.js:644 throw err; ^
Error: Command failed: DIST_OUT=C:\TFS\nodejs-okta-api\dist npm run build
at checkExecSyncError (child_process.js:601:13)
at execSync (child_process.js:641:13)
at Object.build-frontend
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the @okta/samples-nodejs-express-4@3.0.0 prestart script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
DIST_OUT is not recognized...
is the issue detailed in #18.
Closing this issue as it is a duplicate of #18
Unable to configure ExpressOIDC { RequestError: connect ECONNREFUSED 127.0.0.1:7777 at ClientRequest.req.once.err (C:\TFS\nodejs-okta-api\node_modules\got\index.js:219:22) at Object.onceWrapper (events.js:315:30) at emitOne (events.js:121:20) at ClientRequest.emit (events.js:211:7) at Socket.socketErrorListener (_http_client.js:387:9) at emitOne (events.js:116:13) at Socket.emit (events.js:211:7) at emitErrorNT (internal/streams/destroy.js:64:8) at _combinedTickCallback (internal/process/next_tick.js:138:11) at process._tickCallback (internal/process/next_tick.js:180:9) name: 'RequestError', code: 'ECONNREFUSED', host: '127.0.0.1:7777', hostname: '127.0.0.1', method: 'GET', path: '/oauth2/default/.well-known/openid-configuration', protocol: 'http:', url: 'http://127.0.0.1:7777/oauth2/default/.well-known/openid-configura