question

ClaraJ avatar image
ClaraJ asked

[Error]: Failed to deploy. Please ensure current working directory is the root of your skill project.

Hello, I have trouble to deploy my skill in order to finish the ASK CLI installation.

I looked at some other post on forums but I couldn't fine a solution.

The skill.json is inside my folder called: C:\Users\Clara Joffo\alexa\interactive-adventure-game-tool-master

And my skill in inside: C:\Users\Clara Joffo\alexa\interactive-adventure-game-tool-master\lambda\custom

I tried to deploy also after moving the skill.json inside the custom file but it's not working.

If I aim my directory to where is the skill.json I have this result:

C:\Users\Clara Joffo\alexa\interactive-adventure-game-tool-master>ask deploy
[Error]: Failed to deploy. Please ensure current working directory is the root of your skill project.

And if I change the directory to where is my skill I have that:

C:\Users\Clara Joffo\alexa\interactive-adventure-game-tool-master\lambda\custom>ask deploy
[Error]: Can't find skill.json in current working directory.

And then I put the skill.json inside the custom file and I tried and I have this:

C:\Users\Clara Joffo\alexa\interactive-adventure-game-tool-master\lambda\custom>ask deploy
[Error]: Failed to deploy. Please ensure current working directory is the root of your skill project.

Do you know what can I do in order to get that fixed and be able to deploy?

Thank you a lot!!!!

ask clidialog directive
1 comment
10 |5000

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

ClaraJ avatar image ClaraJ commented ·

I've just tried defferent stuff and now when I did ask deploy I had a different answer:

C:\Users\Clara Joffo\alexa\interactive-adventure-game-tool-master>ask deploy
C:\Users\Clara Joffo\AppData\Roaming\npm\node_modules\ask-cli\lib\utils\profile-helper.js:60
    return askProfile.profiles.hasOwnProperty(profileName);
                               ^


TypeError: Cannot read property 'hasOwnProperty' of undefined
    at Object.checkASKProfileExist (C:\Users\Clara Joffo\AppData\Roaming\npm\node_modules\ask-cli\lib\utils\profile-helper.js:60:32)
    at Object.runtimeProfile (C:\Users\Clara Joffo\AppData\Roaming\npm\node_modules\ask-cli\lib\utils\profile-helper.js:24:25)
    at Command.handle (C:\Users\Clara Joffo\AppData\Roaming\npm\node_modules\ask-cli\lib\deploy\deploy.js:38:41)
    at Command.listener (C:\Users\Clara Joffo\AppData\Roaming\npm\node_modules\ask-cli\node_modules\commander\index.js:315:8)
    at emitTwo (events.js:126:13)
    at Command.emit (events.js:214:7)
    at Command.parseArgs (C:\Users\Clara Joffo\AppData\Roaming\npm\node_modules\ask-cli\node_modules\commander\index.js:651:12)
    at Command.parse (C:\Users\Clara Joffo\AppData\Roaming\npm\node_modules\ask-cli\node_modules\commander\index.js:474:21)
    at Object.<anonymous> (C:\Users\Clara Joffo\AppData\Roaming\npm\node_modules\ask-cli\bin\ask.js:35:6)
    at Module._compile (module.js:652:30)
    at Object.Module._extensions..js (module.js:663:10)
    at Module.load (module.js:565:32)
    at tryModuleLoad (module.js:505:12)
    at Function.Module._load (module.js:497:3)
    at Function.Module.runMain (module.js:693:10)
    at startup (bootstrap_node.js:188:16)

So I am going to try to analyse all of that, please let me know if you know how to help me with this! Thank you!

0 Likes 0 ·
Amazon_Bernardo Bezerra avatar image
Amazon_Bernardo Bezerra answered

Hi @ClaraJ and thanks for your message.

The original error message you mentioned () means that the ASKCLI was not able to find the .ask hidden folder which is located in the root directory of your skill and contains a file named config that contains information related to the skill.

This folder is automatically created when you execute "ask new" to create a skill.

Would you mind sharing how you initiated the development of your skill?

Regards,
Barry

10 |5000

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

Ron Wang avatar image
Ron Wang answered

Hi @ClaraJ!

For your first question, please make sure when you run "ask" commands at the root of your skill project, in your case it should be C:\Users\Clara Joffo\alexa\interactive-adventure-game-tool-master

And for your second question, it seems your $HOME/.ask/cli_config file has some mistakes. This file manages all the profiles and accounts settings. You can run "ask init -l" to inspect all your profiles. Your cli_config file doesn't have the "profiles" key.

10 |5000

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

Rohit Yadav avatar image
Rohit Yadav answered

Hi @claraj

Did you resolve the issue? I am facing the same.

9 comments
10 |5000

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

Amazon_Bernardo Bezerra avatar image Amazon_Bernardo Bezerra ♦♦ commented ·

Hi @Rohit Yadav and thanks for your message.

This thread is almost 2 years old. Since the original post quite a few new versions of the ASK CLI were launched. Can you please confirm which version of it you are using?

Regards,
Barry

0 Likes 0 ·
Rohit Yadav avatar image Rohit Yadav Amazon_Bernardo Bezerra ♦♦ commented ·

Hey Barry,

thanks for looking into this. I am using v2.1.1 for ASK CLI. I have attached the screenshot. Please help me out.

0 Likes 0 ·
screenshot-130.png (16.9 KiB)
Amazon_Bernardo Bezerra avatar image Amazon_Bernardo Bezerra ♦♦ Rohit Yadav commented ·

Hello @Rohit Yadav and thanks for the screenshot.

According to the error message, you are not in the root directory of your skill project. To make sure you are in the correct location, execute a dir command and check if the contents of the folder are similar to these:

If they are not, that means that you are not in the root directory.

Regards,
Barry

0 Likes 0 ·
1588003203656.png (9.0 KiB)
Show more comments