Getting Started: Quickstart Guide


#1

(Since I didn’t see a Topic for us complete newbies, I figured I’d start one. If there is one and I missed it, please feel free to point me in the right direction.)

As the very first step of the Quickstart, we’re told to install the CLI by running npm install -g jovo-cli. That doesn’t seem to be working for me:

`C:\Users\keshlam\jovo>npm install -g jovo-cli
npm ERR! Can’t install C:\Users\keshlam\jovo\jovo-cli: Missing package version

npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\keshlam\AppData\Roaming\npm-cache_logs\2021-02-20T16_41_11_321Z-debug.log`

The log says
17 verbose stack Error: Can't install C:\Users\keshlam\jovo\jovo-cli: Missing package version 17 verbose stack at hasMinimumFields (C:\Program Files\nodejs\node_modules\npm\lib\install\validate-args.js:28:15) 17 verbose stack at Array.<anonymous> (C:\Program Files\nodejs\node_modules\npm\node_modules\slide\lib\bind-actor.js:15:8) ...{etc}...

Admittedly, I’ve rarely used npm (outside of some trivial tweak-what-already-exists patching, I’ve rarely needed Javascript), so this could well be an issue in my config rather than Jovo’s. But a hint as to how to fix it would be greatly appreciated.

(And this may suggest that the quickstart guide would benefit from a “prereqs” section.)

Thanks in advance!


#2

Answering my own question: Reinstalling Javascript, and then upgrading with
npm install -g [email protected]
seems to have succeeded (with some warnings).

The jovo update then complains
To use this command, please go into the directory of a valid Jovo project.
… which, again, the quickstart doesn’t mention. It isn’t clear what constitutes “a valid Jovo project”; but I was able to get past that error by cd’ing into a cloned copy of jovo-sample-podcast-player. Again, npm flagged some security concerns, which I’m ignoring for now but which really should be addressed.

The quickstart should also say whether we should run jovo update for every project individually, or if this one execution will have updated shared copies and not be immediately needed again. The requirement that it be run from a jovo project makes me suspect the former…?

Additional question, re the warnings: Is it safe to run npm audit fix --force against the checked-in jovo code? (And if so, could we get it checked in with that already done, please?)

Apologies for the nitpicking, but other beginners might run into the same stumbling blocks – and if I didn’t think it was worth pursuing I wouldn’t be bothering to comment.


#3

Continuing through the quickstart: I created the sample directory. But when I try jovo run from within it, I see repeated

Error: xhr poll error
    at XHR.Transport.onError (C:\Users\keshlam\AppData\Roaming\npm\node_modules\jovo-cli\node_modules\engine.io-client\lib\transport.js:68:13)
    at Request.<anonymous> (C:\Users\keshlam\AppData\Roaming\npm\node_modules\jovo-cli\node_modules\engine.io-client\lib\transports\polling-xhr.js:132:10)
    at Request.Emitter.emit (C:\Users\keshlam\AppData\Roaming\npm\node_modules\jovo-cli\node_modules\component-emitter\index.js:145:20)
    at Request.onError (C:\Users\keshlam\AppData\Roaming\npm\node_modules\jovo-cli\node_modules\engine.io-client\lib\transports\polling-xhr.js:314:8)
    at Timeout._onTimeout (C:\Users\keshlam\AppData\Roaming\npm\node_modules\jovo-cli\node_modules\engine.io-client\lib\transports\polling-xhr.js:274:12)
    at listOnTimeout (node:internal/timers:557:17)
    at processTimers (node:internal/timers:500:7) {
  type: 'TransportError',
  description: Error: Unable to load PFX certificate
      at Object.createSecureContext (node:_tls_common:333:17)
      at Object.connect (node:_tls_wrap:1614:48)
      at Agent.createConnection (node:https:137:22)
      at Agent.createSocket (node:_http_agent:335:26)
      at Agent.addRequest (node:_http_agent:286:10)
      at new ClientRequest (node:_http_client:309:16)
      at Object.request (node:https:333:10)
      at Object.<anonymous> (C:\Users\keshlam\AppData\Roaming\npm\node_modules\jovo-cli\node_modules\agent-base\patch-core.js:25:22)
      at C:\Users\keshlam\AppData\Roaming\npm\node_modules\jovo-cli\node_modules\socks-proxy-agent\node_modules\agent-base\patch-core.js:23:20
      at XMLHttpRequest.send (C:\Users\keshlam\AppData\Roaming\npm\node_modules\jovo-cli\node_modules\xmlhttprequest-ssl\lib\XMLHttpRequest.js:495:17) {
    code: 'ERR_CRYPTO_OPERATION_FAILED'
  }
}```
... so presumably there's still some setup operation I haven't performed.

Trying to look this up online -- TLS keys? I don't currently have a public/private pair in my Windows %HOMEDIR%\,ssh directory, so I'm guessing that's what it wants, and hopefully that's where it expects to find them. If not, I guess I go looking for how Javascript wants that set up and hope Jovo isn't doing anything different.

Again: Not everyone has already been doing standalone Javascript-based communications. It'd probably be good to document the requirement.

#4

Maybe a stupid question, but were you connected to the internet when you have tried jovo run? This looks like the error that returns to me when I’m not online


#5

I’m online, fast wired connection.

I had used “jovo new quickstart” rather than “jovo new Example”, but that seems to make no difference:

C:\Users\keshlam\jovo>jovo new Example

 jovo new: Creates a new Jovo project.
   >> Learn more: https://jovo.tech/docs/cli/new

  I'm setting everything up

  √ Creating new directory /Example
  √ Downloading and extracting template helloworld
  √ Installing npm dependencies...

Installation completed.

C:\Users\keshlam\jovo>cd Example

C:\Users\keshlam\jovo\Example>jovo run


 jovo run: Runs a local development server (webhook).
   >> Learn more: https://jovo.tech/docs/cli/run

Sorry, there seems to be an issue with the connection!
Error: xhr poll error
    at XHR.Transport.onError (C:\Users\keshlam\AppData\Roaming\npm\node_modules\jovo-cli\node_modules\engine.io-client\lib\transport.js:68:13)
    at Request.<anonymous> (C:\Users\keshlam\AppData\Roaming\npm\node_modules\jovo-cli\node_modules\engine.io-client\lib\transports\polling-xhr.js:132:10)
    at Request.Emitter.emit (C:\Users\keshlam\AppData\Roaming\npm\node_modules\jovo-cli\node_modules\component-emitter\index.js:145:20)
    at Request.onError (C:\Users\keshlam\AppData\Roaming\npm\node_modules\jovo-cli\node_modules\engine.io-client\lib\transports\polling-xhr.js:314:8)
    at Timeout._onTimeout (C:\Users\keshlam\AppData\Roaming\npm\node_modules\jovo-cli\node_modules\engine.io-client\lib\transports\polling-xhr.js:274:12)
    at listOnTimeout (node:internal/timers:557:17)
    at processTimers (node:internal/timers:500:7) {
  type: 'TransportError',
  description: Error: Unable to load PFX certificate
      at Object.createSecureContext (node:_tls_common:333:17)
      at Object.connect (node:_tls_wrap:1614:48)
      at Agent.createConnection (node:https:137:22)
      at Agent.createSocket (node:_http_agent:335:26)
      at Agent.addRequest (node:_http_agent:286:10)
      at new ClientRequest (node:_http_client:309:16)
      at Object.request (node:https:333:10)
      at Object.<anonymous> (C:\Users\keshlam\AppData\Roaming\npm\node_modules\jovo-cli\node_modules\agent-base\patch-core.js:25:22)
      at C:\Users\keshlam\AppData\Roaming\npm\node_modules\jovo-cli\node_modules\socks-proxy-agent\node_modules\agent-base\patch-core.js:23:20
      at XMLHttpRequest.send (C:\Users\keshlam\AppData\Roaming\npm\node_modules\jovo-cli\node_modules\xmlhttprequest-ssl\lib\XMLHttpRequest.js:495:17) {
    code: 'ERR_CRYPTO_OPERATION_FAILED'
  }
}
Sorry, there seems to be an issue with the connection!
Error: xhr poll error
    at XHR.Transport.onError (C:\Users\keshlam\AppData\Roaming\npm\node_modules\jovo-cli\node_modules\engine.io-client\lib\transport.js:68:13)
    at Request.<anonymous> (C:\Users\keshlam\AppData\Roaming\npm\node_modules\jovo-cli\node_modules\engine.io-client\lib\transports\polling-xhr.js:132:10)
    at Request.Emitter.emit (C:\Users\keshlam\AppData\Roaming\npm\node_modules\jovo-cli\node_modules\component-emitter\index.js:145:20)
    at Request.onError (C:\Users\keshlam\AppData\Roaming\npm\node_modules\jovo-cli\node_modules\engine.io-client\lib\transports\polling-xhr.js:314:8)
    at Timeout._onTimeout (C:\Users\keshlam\AppData\Roaming\npm\node_modules\jovo-cli\node_modules\engine.io-client\lib\transports\polling-xhr.js:274:12)
    at listOnTimeout (node:internal/timers:557:17)
    at processTimers (node:internal/timers:500:7) {
  type: 'TransportError',
  description: Error: Unable to load PFX certificate
      at Object.createSecureContext (node:_tls_common:333:17)
      at Object.connect (node:_tls_wrap:1614:48)
      at Agent.createConnection (node:https:137:22)
      at Agent.createSocket (node:_http_agent:335:26)
      at Agent.addRequest (node:_http_agent:286:10)
      at new ClientRequest (node:_http_client:309:16)
      at Object.request (node:https:333:10)
      at Object.<anonymous> (C:\Users\keshlam\AppData\Roaming\npm\node_modules\jovo-cli\node_modules\agent-base\patch-core.js:25:22)
      at C:\Users\keshlam\AppData\Roaming\npm\node_modules\jovo-cli\node_modules\socks-proxy-agent\node_modules\agent-base\patch-core.js:23:20
      at XMLHttpRequest.send (C:\Users\keshlam\AppData\Roaming\npm\node_modules\jovo-cli\node_modules\xmlhttprequest-ssl\lib\XMLHttpRequest.js:495:17) {
    code: 'ERR_CRYPTO_OPERATION_FAILED'
  }
}

  INFO: Local FileDb (db-filedb) ----------------------------------------

  C:\Users\keshlam\jovo\Example\db\db.json created!

  More Info: >> https://www.jovo.tech/docs/databases/file-db

   ----------------------------------------------------------------------

Local server listening on port 3000.
  Sorry, there seems to be an issue with the connection!
Sorry, there seems to be an issue with the connection!
Error: xhr poll error
    at XHR.Transport.onError (C:\Users\keshlam\AppData\Roaming\npm\node_modules\jovo-cli\node_modules\engine.io-client\lib\transport.js:68:13)
    at Request.<anonymous> (C:\Users\keshlam\AppData\Roaming\npm\node_modules\jovo-cli\node_modules\engine.io-client\lib\transports\polling-xhr.js:132:10)
    at Request.Emitter.emit (C:\Users\keshlam\AppData\Roaming\npm\node_modules\jovo-cli\node_modules\component-emitter\index.js:145:20)
    at Request.onError (C:\Users\keshlam\AppData\Roaming\npm\node_modules\jovo-cli\node_modules\engine.io-client\lib\transports\polling-xhr.js:314:8)
    at Timeout._onTimeout (C:\Users\keshlam\AppData\Roaming\npm\node_modules\jovo-cli\node_modules\engine.io-client\lib\transports\polling-xhr.js:274:12)
    at listOnTimeout (node:internal/timers:557:17)
    at processTimers (node:internal/timers:500:7) {
  type: 'TransportError',
  description: Error: Unable to load PFX certificate
      at Object.createSecureContext (node:_tls_common:333:17)
      at Object.connect (node:_tls_wrap:1614:48)
      at Agent.createConnection (node:https:137:22)
      at Agent.createSocket (node:_http_agent:335:26)
      at Agent.addRequest (node:_http_agent:286:10)
      at new ClientRequest (node:_http_client:309:16)
      at Object.request (node:https:333:10)
      at Object.<anonymous> (C:\Users\keshlam\AppData\Roaming\npm\node_modules\jovo-cli\node_modules\agent-base\patch-core.js:25:22)
      at C:\Users\keshlam\AppData\Roaming\npm\node_modules\jovo-cli\node_modules\socks-proxy-agent\node_modules\agent-base\patch-core.js:23:20
      at XMLHttpRequest.send (C:\Users\keshlam\AppData\Roaming\npm\node_modules\jovo-cli\node_modules\xmlhttprequest-ssl\lib\XMLHttpRequest.js:495:17) {
    code: 'ERR_CRYPTO_OPERATION_FAILED'
  }
}

… and so on, apparently endlessly retrying and failing.

Again, environment is Windows 10, with new install of javascript, npm, and jovo and no prior use of Javascript on this machine. node -v says v15.9.0. ‘jovo -v’ says


Jovo packages of current project:
  jovo-core: 3.4.1
  jovo-db-filedb: 3.4.1
  jovo-framework: 3.4.1
  jovo-platform-alexa: 3.5.0
  jovo-platform-dialogflow: 3.5.0
  jovo-platform-googleassistant: 3.5.0
  jovo-plugin-debugger: 3.4.1

#6

Did you try to use the command “jovo new Example” in the terminal?
After that cd in the Example and try jovo-run, you have the same issue?


#7

(See above.)

My google-fu is failing me; searching the internet for “javascript Unable to load PFX certificate” isn’t finding a clear fix.


#8

The node v15 is not so stable, I use and I suggest you use “nvm mode” and use the 12’s version of node, maybe that will fix the problem


#9

Thanks for documenting all of this @keshlam, we definitely need to get better with our documentation!

Yes, as @Il_Mil1 said, Node v15 comes with a few issues. Can you try again with Node 12?


#10

I was starting to suspect that this was due to the latest Node having applied the same changes that went into various other software to discourage un-encrypted connections… OK, I’ll find instructions to roll Node back and see what happens.

I presume you will be updating Jovo to work with the newer Node.js releases, right?

Assuming I stick with Jovo, I’d be glad to contribute to documentation upkeep – and to code once I’m more comfortable in Javascript/Typescript. (My primary programming languages these days are C and Java, but I’ve used enough enough others that I can usually bootstrap fairly quickly.)


#11

Downgrading node.js did resolve the issue.

I’d still like to hear a “yes, we will be fixing the incompatibility”…


#12

Less than obvious: The quickstart says “specify a name on the MyNameIsIntent button.” Since you haven’t yet taught the user how to run the debugger, it would help to clarify that they need to first click the [v] menu button and select Set Parameters, enter their name there, then either click MyNameIsIntent or click [v] again and select the phrasing they want to trigger that intent with.