Vue + Vite setup for DOMO?

Hi All,

Does DOMO support apps being developed with Vue and Vite? I found the Starter Kit info in the Dev docs to setup Vue CLI and Webpack but the recommendation is to use create-vue as Vue CLI is in maintenance mode now and I am not sure what steps to take next to enable an app to be published and worked on in Domo.

Any advice would be appreciated!

Thanks!

Best Answer

  • rileystahura
    rileystahura Admin
    edited March 2023 Answer ✓

    Sure thing @Rich , @btp_tlangston Yes you can use front-end frameworks like React/Vue/Angular.

    I understand that the Domo “starter kit” for Vue instructs you to use the Vue cli even though that is in maintenance mode. That's fine, you do not need to use the Vue CLI as I believe create-vue supports most of what Vue CLI provides. These starter kits were just originally intended to give you a quick start and skip some of the prerequesite setup steps.

    You can start your vue project like you would any other website , you just need to be aware of the setup steps that are required here:

    https://developer.domo.com/docs/dev-studio-quick-start/set-up

    More specifically this would be installing the Domo CLI (which is what you use to publish/deploy your app to Domo) and also the domo.js (which is used to query Domo datasets and get environment data like the currently logged in user, among other things) library which you can read about here:

    https://developer.domo.com/docs/dev-studio-guides/domo-js

    Lastly I'd like to reiterate that the process to building and deploying a custom app is almost identical to building and deploying a website. Think of Domo.js like you would any other 3rd party library, and think of the Domo CLI like you would any other CLI tool. If you're familiar with that process then you shouldn't have too much difficulty in setting this up.

Answers

  • Rich
    Rich Domo Employee

    @rileystahura any thoughts on this one? I know you do quite a bit with Domo apps.

  • rileystahura
    rileystahura Admin
    edited March 2023 Answer ✓

    Sure thing @Rich , @btp_tlangston Yes you can use front-end frameworks like React/Vue/Angular.

    I understand that the Domo “starter kit” for Vue instructs you to use the Vue cli even though that is in maintenance mode. That's fine, you do not need to use the Vue CLI as I believe create-vue supports most of what Vue CLI provides. These starter kits were just originally intended to give you a quick start and skip some of the prerequesite setup steps.

    You can start your vue project like you would any other website , you just need to be aware of the setup steps that are required here:

    https://developer.domo.com/docs/dev-studio-quick-start/set-up

    More specifically this would be installing the Domo CLI (which is what you use to publish/deploy your app to Domo) and also the domo.js (which is used to query Domo datasets and get environment data like the currently logged in user, among other things) library which you can read about here:

    https://developer.domo.com/docs/dev-studio-guides/domo-js

    Lastly I'd like to reiterate that the process to building and deploying a custom app is almost identical to building and deploying a website. Think of Domo.js like you would any other 3rd party library, and think of the Domo CLI like you would any other CLI tool. If you're familiar with that process then you shouldn't have too much difficulty in setting this up.

  • Thanks @Rich and @rileystahura! This information is a great start for me.

    I wasn't sure if I could approach it from the opposite direction (i.e. adding the library to an already existing project) as this is kind of new territory for me, my background being in mostly .NET technologies and building backend integrations.

  • @rileystahura - I tried following the directions on the two links you provided me above trying to build a React app. I am running into several problems.

    I tried using Chocolately to install the domo CLI on my machine, and i kept getting a checksum error so it wouldn't install. Then I tried to install the canary version using npm and that seemed to install correctly, I show a domo version of 4.2.6.

    Then we followed the instructions for the create-react-app install with the domoinc template and we are getting the following errors when we try to run npm start:

    The app published successfully and I copied the id into the manifest.json on the public folder and made sure that I had done the domo login prior to running npm start. I had submitted a support ticket about this and they advised me to post the question here to get the answer 😗

    Should I post this as a separate question or do you have any advice on getting past this?

  • @btp_tlangston The people that get this error are usually instructed to attempt these steps again using gitbash instead of windows command line / powershell. You can try that out.

    I've personally never had this issue so I don't have any experience with this particular error, but I know using git bash has helped others in the past.

  • @rileystahura That is part of my problem… I was using gitbash. I don't use Powershell/ command line when doing anything with node or js. I am wondering if we have an issue with the company-issued laptops I am running on? I will try doing this on a separate Linux laptop and see if I get the same issue.

  • @rileystahura - I tried doing this same app with a Laptop with LinuxMint 21 and I had no problems creating the app and running a local dev on the app. If you never had this problem, then I am assuming you are either using a Mac or a Linux setup.

    Apparently, the issue must be somewhere in Windows but I am not sure where. My first attempt was with my work Laptop (Windows 10 Enterprise) which has several features locked down due to company policy, so I thought it may have been something to do with that. I then tried a personal laptop with Windows installed that did not have any of the contstraining policies setup and I still had the authentication error.


    I then tried an older laptop I had with LinuxMint 21 installed on it and had no issue running a local dev on the app so that's where I am at right now. I don't know enough to figure out why the windows laptops refuse to authenticate but I can at least start working on the app with my LinuxMint box (even though it is much slower..🤤). Thanks for all your help.

  • @btp_tlangston yeah I'm not sure, I've used both windows and Mac over the past 2+ years for various projects and I haven't had the issue.

    What I've been told is that this only tends to happen on apps "built on older versions of node", but I don't know what the solution is there.

    Happy to help!