简体   繁体   中英

Cannot publish Bot to Azure using npm in VS Code

I'm trying to publish my chatbot application to Azure as instructed in the Azure Portal build menu: Screenshot of instructions

I successfully download the code zip file, and it runs fine in VSCode and the Bot Emulator. However, when I do npm run azure-publish , I get the error npm ERR! missing script: azure-publish npm ERR! missing script: azure-publish . I have not changed any of the build files or the node modules. This exact project runs without an issue in the Azure Online App Editor.

I don't understand where I'm going wrong. Where can I find the script for azure-publish ? Is it even possible to publish using npm on VS Code? I've seen examples of publishing using Visual Studio, but haven't come across one with VS Code. Screenshot of directory

Any help or insight is much appreciated.

Resolved!

For anyone who might have the same problem, I had missed adding "scripts": {"azure-publish": "node publish.js"} to my package.json . Online Code Editor doesn't do it for you, so it has to be manually done if downloading code zip file.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM