question

samy-adv avatar image
samy-adv asked

Sample App

I was trying with sample app for the Alexa Voice services. I followed the document and setup the project in the developer portal. But in the /samples/companionService when i and trying to run "npm start" I am getting this error: > alexa-voice-service-sample-companion-service@1.0.0 start D:\NI_Project\voiceRe c\AlexaVoiceServiceExamples\samples\companionService > node ./bin/www module.js:338 throw err; ^ Error: Cannot find module 'D:\NI_Project\voiceRec\AlexaVoiceServiceExamples\samp les\companionService\bin\www' at Function.Module._resolveFilename (module.js:336:15) at Function.Module._load (module.js:278:25) at Function.Module.runMain (module.js:501:10) at startup (node.js:129:16) at node.js:814:3 npm ERR! Windows_NT 6.1.7601 npm ERR! argv "C:\\Program Files\\nodejs\\\\node.exe" "C:\\Program Files\\nodejs \\node_modules\\npm\\bin\\npm-cli.js" "start" npm ERR! node v0.12.7 npm ERR! npm v2.11.3 npm ERR! code ELIFECYCLE npm ERR! alexa-voice-service-sample-companion-service@1.0.0 start: `node ./bin/w ww` npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the alexa-voice-service-sample-companion-service@1.0.0 start script 'node ./bin/www'. npm ERR! This is most likely a problem with the alexa-voice-service-sample-compa nion-service package, npm ERR! not with npm itself. npm ERR! Tell the author that this fails on your system: npm ERR! node ./bin/www npm ERR! You can get their info via: npm ERR! npm owner ls alexa-voice-service-sample-companion-service npm ERR! There is likely additional logging output above. npm ERR! Please include the following file with any support request: npm ERR! D:\NI_Project\voiceRec\AlexaVoiceServiceExamples\samples\companionS ervice\npm-debug.log D:\NI_Project\voiceRec\AlexaVoiceServiceExamples\samples\companionService>dir Volume in drive D is New Volume Volume Serial Number is 1432-1F08 Directory of D:\NI_Project\voiceRec\AlexaVoiceServiceExamples\samples\companion Service
alexa voice service
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Eric@Amazon avatar image
Eric@Amazon answered
Did you run 'npm install' before 'npm start'?
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

samy-adv avatar image
samy-adv answered
Yes I did run "npm install" before "npm start"
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

samy-adv avatar image
samy-adv answered
Ok I got that fixed was having some issue with the "Self-Signed Certificates"
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Eric@Amazon avatar image
Eric@Amazon answered
Glad it's resolved!
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

shrana avatar image
shrana answered
hi! what issue did you have with the certificates... I am getting the same error as yours, but not able to solve it....
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Levon@Amazon avatar image
Levon@Amazon answered
Hi shrana, Welcome to dev forums and thanks for posting! What certificate are you using? Please see the following thread for possible solutions: https://forums.developer.amazon.com/forums/thread.jspa?threadID=10010
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

shrana avatar image
shrana answered
hi Levon, Thanks for youe reply. Let me give you a heads up on what i am doing. I am trying to follow the reerence implemetation document and setup the alexa environment. I am using Self Signed Certificates as given in the reference implementation. But when i use 'npm start'. i am getting the above error. Any help would appreciated. Thanks shrana
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Levon@Amazon avatar image
Levon@Amazon answered
Thanks shrana, Self-signed certificates are tricky (e.g. most people don't create them with the required DNS.1 entry among other things) and otherwise those were known to have some issues in the past. To eliminate this possible unknown, I would recommend you to try the free Let's Encrypt certificate to get this to work ( https://letsencrypt.org/). If you go that route, when using Let's Encrypt, please keep in mind that the cross-signing allows you to pick between two different interchangeable "Let’s Encrypt Authority X1" certificates that you can present in your certificate chain. You have to use the right intermediate certificate (the one signed by IdenTrust, not the one signed by ISRG Root X1) in order for it to work. Please refer to the link I posted in my previous reply and read through that entire discussion for various pitfalls and solutions to them. If after this you still experience any issues, please let us know. Thanks!
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.