auth0 / auth0-extension-voice-factor

Provides multi-factor authentication with VoiceIt.
5 stars 2 forks source link

Issues when running the local JS app as well as the Auth0 Extension #2

Open jralmaraz opened 5 years ago

jralmaraz commented 5 years ago

Hi there.

First of all, thank you for the very good tutorial, it is very interesting!

I have gone through it, but had an issue when running the local app, I am getting the following deprecated related message:

node:145424) [DEP0062] DeprecationWarning: node --debug and node --debug-brk are invalid. Please use node --inspect or node --inspect-brk instead. Program node --debug src/runtimes/wrapper-dev-local.js exited with code 9

When doing "node --inspect .\src\runtimes\wrapper-dev-local.js" I get:

Debugger listening on ws://127.0.0.1:9229/c6f50f90-ffd1-4851-b5be-1bc4f851fe7a For help, see: https://nodejs.org/en/docs/inspector internal/modules/cjs/loader.js:762 throw err; ^ in JSON at position 445 src\runtimes\dev-local-config.json: Unexpected token at JSON.parse () at Object.Module._extensions..json (internal/modules/cjs/loader.js:759:27) at Module.load (internal/modules/cjs/loader.js:626:32) at tryModuleLoad (internal/modules/cjs/loader.js:566:12) at Function.Module._load (internal/modules/cjs/loader.js:558:3) at Module.require (internal/modules/cjs/loader.js:663:17) at require (internal/modules/cjs/helpers.js:20:18) at Object. \src\runtimes\wrapper-dev-local.js:12:16) at Module._compile (internal/modules/cjs/loader.js:734:30) at Object.Module._extensions..js (internal/modules/cjs/loader.js:745:10) at Module.load (internal/modules/cjs/loader.js:626:32) at tryModuleLoad (internal/modules/cjs/loader.js:566:12) at Function.Module._load (internal/modules/cjs/loader.js:558:3) at Function.Module.runMain (internal/modules/cjs/loader.js:797:12) at executeUserCode (internal/bootstrap/node.js:526:15) at startMainThreadExecution (internal/bootstrap/node.js:439:3)

Can you confirm if it runs straight out of the box after npm intall/start or there are other requirements to clear before ?

PS: there is also some vulnerabilities warnings when running "npm audit". I will try to go through them manually and refactor.

Thanks.

Jose

jralmaraz commented 5 years ago

As per doubts raised on #3 , I have removed the ENCRYPTION_KEY and I can run the inspect:

node --inspect .\src\runtimes\wrapper-dev-local.js Debugger listening on ws://127.0.0.1:9229/42d9cf82-ca49-4f5e-9160-ad6d5cada86e For help, see: https://nodejs.org/en/docs/inspector Server started at: https://voicefactor.localtest.me:7100/vf/ Debugger attached. Debugger listening on ws://127.0.0.1:9229/42d9cf82-ca49-4f5e-9160-ad6d5cada86e For help, see: https://nodejs.org/en/docs/inspector

Running npm start still complains on some deprecated debugger though:

npm start

auth0-extension-voice-factor@1.0.0 start \git\auth0-extension-voice-factor supervisor -t -e "js|css|html" -w src/ -- --debug src/runtimes/wrapper-dev-local.js

Running node-supervisor with program '--debug src/runtimes/wrapper-dev-local.js' --watch 'src/' --non-interactive --extensions 'js|css|html' --exec 'node'

Starting child process with 'node --debug src/runtimes/wrapper-dev-local.js' Watching directory '\src' for changes. (node:166152) [DEP0062] DeprecationWarning: node --debug and node --debug-brk are invalid. Please use node --inspect or node --inspect-brk instead. Program node --debug src/runtimes/wrapper-dev-local.js exited with code 9

Starting child process with 'node --debug src/runtimes/wrapper-dev-local.js' (node:166252) [DEP0062] DeprecationWarning: node --debug and node --debug-brk are invalid. Please use node --inspect or node --inspect-brk instead. Program node --debug src/runtimes/wrapper-dev-local.js exited with code 9

Starting child process with 'node --debug src/runtimes/wrapper-dev-local.js' (node:166344) [DEP0062] DeprecationWarning: node --debug and node --debug-brk are invalid. Please use node --inspect or node --inspect-brk instead. Program node --debug src/runtimes/wrapper-dev-local.js exited with code 9

Starting child process with 'node --debug src/runtimes/wrapper-dev-local.js' (node:166484) [DEP0062] DeprecationWarning: node --debug and node --debug-brk are invalid. Please use node --inspect or node --inspect-brk instead. Program node --debug src/runtimes/wrapper-dev-local.js exited with code 9

Starting child process with 'node --debug src/runtimes/wrapper-dev-local.js' (node:163208) [DEP0062] DeprecationWarning: node --debug and node --debug-brk are invalid. Please use node --inspect or node --inspect-brk instead. Program node --debug src/runtimes/wrapper-dev-local.js exited with code 9

Starting child process with 'node --debug src/runtimes/wrapper-dev-local.js' (node:166508) [DEP0062] DeprecationWarning: node --debug and node --debug-brk are invalid. Please use node --inspect or node --inspect-brk instead. Program node --debug src/runtimes/wrapper-dev-local.js exited with code 9

jralmaraz commented 5 years ago

node --version v11.9.0

Updated the package.json start command to use inspect as per the message:

"scripts": { "start": "supervisor -t -e \"js|css|html\" -w src/ -- --inspect src/runtimes/wrapper-dev-local.js",