alexa-samples/skill-sample-nodejs-audio-player

Step by Step for Node.js beginners?

Closed this issue · 3 comments

I'm a total novice at this and I just can't find a truly simple step by step tutorial on getting something like this working. Half the commands in the tutorial fail on me when I use cmd in Node.js. I think I am missing a huge beginning step with package.json. Basically I was hoping for steps from installing Node.js on a windows machine to packaging the skill correctly to installing. I feel like once I get into the skill side of things its rather straight forward. But packaging the skill and the steps you take from raw install of Node.js in Windows to the skill is where I am stuck. Anyone willing to help? Thanks SO much in advance.

Update: I'm just new. Figured it out.

Any chance you can do a step by step for another beginner?
Just looking to set up a skill with the single audio stream.

Where are you getting stuck, @simonk1969 ?

Are you just looking to use the single stream version, and change that one file link? If so, a quick poke around the files will point you in the right direction. But it's certainly not a node-newbie friendly repo (as I found when I first started). When I first saw it, I was like "why the hell are there all these little files all over the place". It all makes sense now, but that's 2 months down the line.

And some point, you're going to need to get to know the ask deploy commands etc, because believe me, the "zipping and uploading" nonsense will quickly do your head in!

So, start with "ask clone", and select your skill.

If it's just a very simple copy of the template, then just edit the URL etc in this file:
https://github.com/alexa/skill-sample-nodejs-audio-player/blob/mainline/single-stream/lambda/src/audioAssets.js

And the messages in this file (eg) https://github.com/alexa/skill-sample-nodejs-audio-player/blob/c7f02fac5cbb65d208fd65b5bcb7d442131e4b0f/multiple-streams/js/stateHandlers.js#L23

Then back at the root of your project on your machine do an "ask deploy". Don't forget to visit the skill to turn "testing" back on (ask deploy annoying turns it off), and give it a go.

Any use?

Thank you @talkingnews . You're right this skill sample repo is to learn how to develop and Alexa skill, not how to develop with NodeJS (or how to develop at all :-) ) There are plenty of other places to learn doing so. Let us know if some documentation steps are incorrect or not enough documented however.