Giter VIP home page Giter VIP logo

Comments (11)

annasxu avatar annasxu commented on August 10, 2024 8

Fixed! Thank you!!

from skill-sample-nodejs-fact-in-skill-purchases.

next-nurialopez avatar next-nurialopez commented on August 10, 2024 6

@annasxu how did you fix it? I'm getting the same error after changing my lambda from node 4 to node 8, I just changed the runtime and I am getting that error.
What I want to do is upgrade my lambda to node 8 and in order to see what needs to change I have just started with the runtime and I get this error.
I don't know if I have to update some modules or something else for migrating my lambda.
Any help would be appreciated.
Thanks.

from skill-sample-nodejs-fact-in-skill-purchases.

NasreenUstad avatar NasreenUstad commented on August 10, 2024 2

select all your files (index.js, node_modules, package.json) then add to the archive, what we are doing here is we are zipping the entire folder that's why AWSlambda is not able to read the index.js file.

try it and let me know.
Thanks

from skill-sample-nodejs-fact-in-skill-purchases.

annasxu avatar annasxu commented on August 10, 2024

I'm also seeing the following error in my terminal:

Error(s) found in the deploy setting for the following in-skill product(s):
(Please restore the missing file or modify skill configuration file .ask/config to fix the deploy setting)

Missing file: [ID] undefined [FILE] isps/entitlement/Entitlement_Template.json

And I have updated the release date to be a future date.

from skill-sample-nodejs-fact-in-skill-purchases.

franklin-lobb avatar franklin-lobb commented on August 10, 2024

Normally Lambda is looking for a file in the root of the deployment package that matches the handler name. In this case, index.js. This file will export a handler function, which is invoked when Alexa passes the request to the Lambda function. In order for this to work, assuming all of the files were properly cloned, there should be an index.js file in the lambda/custom folder in your project (the project root is where the skill.json file is located, and is where you should be running the ask deploy.

Check that the index.js file is present in the lambda/custom folder (and has the code found in the repo). If it is, retry the ask deploy and look to confirm there isn't an error during the deployment.

As for the second issue, that looks to be solved here: #7.

from skill-sample-nodejs-fact-in-skill-purchases.

annasxu avatar annasxu commented on August 10, 2024

I'm not getting any errors when I do ask deploy, but when i do ask new as per the instructions, I'm given the following set up:

screen shot 2018-05-29 at 1 28 45 am

from skill-sample-nodejs-fact-in-skill-purchases.

franklin-lobb avatar franklin-lobb commented on August 10, 2024

The picture you posted looks correct. (I'm using lambda/custom as shorthand to indicate there's a custom folder in the lambda folder.) The clone should result in the same as the ask new plus following the other instructions, with two exceptions: (1) the clone will pull down the isps.samples folder, but you can access those from the repo directly and they aren't used by the ask-cli directly, and (2) some github specific files like the license, pull request template, etc., which also aren't used by the ask-cli.

You indicated that the ask new resulted in the folders being setup differently. What are the differences? Are they just the extra folders/files I mentioned, or is there something different with those core files?

If you are comfortable with what the ask-cli does, you don't have to manually modify the files as described in the first section of the instructions. You can clone the repo and skip to the second section.

from skill-sample-nodejs-fact-in-skill-purchases.

annasxu avatar annasxu commented on August 10, 2024

Thanks for your response! After searching some forums, what ended up getting rid of the module index error was changing the permissions on the files and then zipping the contents of the custom folder, and uploading that directly to my lambda console. Unfortunately, when I test the skill, I see the following:

screen shot 2018-05-29 at 2 58 45 pm

Any ideas?

from skill-sample-nodejs-fact-in-skill-purchases.

franklin-lobb avatar franklin-lobb commented on August 10, 2024

It looks like there isn't a call being made to the lambda function (the error is happening before that), is that correct? If so, I'm not sure what to suggest other than disabling and re-enabling the skill for testing. I have not seen this error before.

from skill-sample-nodejs-fact-in-skill-purchases.

hspeight avatar hspeight commented on August 10, 2024

In my case I was getting this because I tried to require something that wasn't in node_modules.

from skill-sample-nodejs-fact-in-skill-purchases.

franklin-lobb avatar franklin-lobb commented on August 10, 2024

@next-nurialopez are you having a problem with this sample, or are you just generally trying to upgrade your lambda function from node 4 to node 8? If the latter, the Alexa Forums would be a better place to ask that question.

That said, as the others have suggested, check your requires statements and confirm that the modules you are requiring are available. If you had a working function using Node 4, and all you changed was the runtime, then I would expect it to still work. Try looking at your stack trace and see if you can identify the specific line with the problem and that should provide a clue as to how to proceed. If you're not sure how to read your stack trace, you could post it here and we might be able to help.

from skill-sample-nodejs-fact-in-skill-purchases.

Related Issues (18)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.