Develop Google Apps Script Locally in VSCode using CLASP

Поділитися
Вставка
  • Опубліковано 12 вер 2024
  • Learn how to use clasp to develop Google Apps Script projects in your favorite editor. We'll be using Visual Studio Code in this tutorial.
    Install NodeJs & VSCode
    • Install Node JS & Visu...
    github.com/goo...

КОМЕНТАРІ • 67

  • @reubenmarkgorda3518
    @reubenmarkgorda3518 4 роки тому +12

    This is the video I've been waiting for. It's really hard to find videos/tutorials that utilizes Apps Script for Web Applications and it's even harder to find videos that uses something like Vue/React that interacts with Sheet as database. Really appreciate your videos man!

  • @philipevangelista3020
    @philipevangelista3020 2 роки тому +1

    I know your voice too well. Watched tons of your videos in Learn Google Spreadsheets, which helped me a lot in my work. I'm really glad I stumbled upon this channel (something to binge watch/learn). Thanks so much!

  • @leonardoantiqui999
    @leonardoantiqui999 3 роки тому +2

    I just found out you have this channel. I am leaving this comment to thank you for all your contributions. Very helpful.

  • @dainiusstankevicius5567
    @dainiusstankevicius5567 2 роки тому +11

    Don't know why, but after `clasp clone --rootDir src`, the .clasp.json file appeared inside of `src` folder. That did not allow to do `clasp push` correctly, but after moving it out one folder above, everything worked fine. Maybe that helps someone too.

    • @rainardopuster
      @rainardopuster 2 роки тому

      Thanks!! Got the same problem with clasp push, but after moving claps.json it's working like charm! Cheers!

  • @russellgregory1537
    @russellgregory1537 3 роки тому +1

    OK, that was the best CLASP video on UA-cam. I’m not sure you could watch this and have any questions how to setup CLASP on a Mac. Thanks man, clear, concise instructions. Keep it up, I’m off to check out your other videos.

  • @snoopydoo8979
    @snoopydoo8979 3 роки тому +1

    You made my day with this video - your channel on GAS is by far the best I've come across so far (for me as an absolute GAS beginner). For those of you who also want to set up this workflow and need to install all those programs on their machines for the first time: it seems to be essential that you have to initialise npm first, before you can install CLASP. Otherwise you'll receive an error message like "package.json is missing" (I am using Windows 10). When I swapped the sequence of steps, I finally managed to get that confirmation message for a successful CLASP installation.

  • @bang-naim
    @bang-naim 2 роки тому

    You're the best. I started from your Google sheets video and now here I am. Thank you so much!

  • @wmaxsen
    @wmaxsen 3 роки тому

    This video is really super well explained, step by step, with what is required to code Google Apps Script in VS Code. The new GAS Script Editor is much better than its predecessor, but it doesn't compare to what VS Code offers. Thank you so much for taking the time to create this video. Really appreciated it. Looking forward to more Google Apps Script videos!

  • @paperpotato91
    @paperpotato91 4 роки тому +1

    Thank you so much for this! I stumbled across your video - looking forward to pouring through the rest :) :)

  • @stevebolman6518
    @stevebolman6518 2 роки тому +1

    Still the best Clasp Intro out there.

  • @maelstrom57
    @maelstrom57 2 роки тому +1

    Thanks a lot for this. Makes me want to build lots of new apps now that I can use TypeScript and a proper code editor. :)

  • @zacharygrammon223
    @zacharygrammon223 4 роки тому

    Great work! I hadn't noticed the --watch flag before, so super helpful.

  • @mwKanj
    @mwKanj Рік тому +1

    Great tutorial! Thank you very much!

  • @isaiasfrederick
    @isaiasfrederick 4 роки тому +1

    Very useful this tutorial and this tool. Develop a script on GAS using that poor web interface is expensive and uncomfortable.
    Thanks!

  • @LukeMartinVideo
    @LukeMartinVideo 7 місяців тому

    Every 6 month or so i come back to THIS video as i have to update our SHEETS workflow XD

  • @man_vs_life
    @man_vs_life Рік тому

    Seems very clear, thank you. Now to try it out...

  • @amir_lutfi
    @amir_lutfi Рік тому

    Thank you for your best tutorial 🤝

  • @LatinosHablandoInglés
    @LatinosHablandoInglés 2 роки тому

    Thank you very much from Venezuela

  • @VikasSingh-uc3yv
    @VikasSingh-uc3yv 2 роки тому

    This is really helpful. Thank you so much for making it!
    I have a question - is it possible to run the code inside VSCode instead of using the Google Script Editor?

    • @getitdonetube
      @getitdonetube  2 роки тому

      Yes, but it's pretty complicated and not exactly sure if it's worth it.

    • @VikasSingh-uc3yv
      @VikasSingh-uc3yv 2 роки тому

      @@getitdonetube I'm still interested. Can you please share the steps?

    • @getitdonetube
      @getitdonetube  2 роки тому

      The steps are here github.com/google/clasp/blob/master/docs/run.md
      Note that this requires a self managed project and once you switch, there is no way back. So maybe make a copy and try it on the copy if you're doing this for the first time.

    • @VikasSingh-uc3yv
      @VikasSingh-uc3yv 2 роки тому

      @@getitdonetube Understood. Thanks for sharing the link. I appreciate it.

  • @iancarr3923
    @iancarr3923 Рік тому

    Excellent, thanks!

  • @LukeMartinVideo
    @LukeMartinVideo 3 роки тому

    Thank you. Great job !

  • @user-dz6qx2fq4h
    @user-dz6qx2fq4h 3 роки тому

    thank you, you saved my life

  • @denisradovanovic8778
    @denisradovanovic8778 Рік тому +1

    I followed everything to a T and I got this error when I try to do "clasp push":
    No valid ~/appsript/.clasp.json project file. You may need to `create` or `clone` a project first.
    And yet I have it as I followed everything.
    Any inputs?

    • @denisradovanovic8778
      @denisradovanovic8778 Рік тому +1

      OK found the solution. For people that are struggling -
      Cloning clones everything into src directory but ".clasp.json project file" has to be outside of it for "clasp push" to work. Just move the file outside of SRC folder and it would work like a charm.

    • @basiccomponents
      @basiccomponents Рік тому

      @@denisradovanovic8778 thanks a lot!

  • @marsidev
    @marsidev 3 роки тому +1

    Thanks 🤩

  • @user-ld8wn9kq6c
    @user-ld8wn9kq6c 10 місяців тому

    thanks!

  • @manolosolalinde
    @manolosolalinde 4 роки тому +1

    Autocomplete is not working for me. I followed the exact steps. :(

    • @getitdonetube
      @getitdonetube  4 роки тому

      Just restart VSCode and see if it works.

    • @valentinsarmagal
      @valentinsarmagal 3 роки тому

      @@getitdonetube same here, restarted and nothing...

  • @direxp1757
    @direxp1757 4 роки тому

    Many thanks for this great video.
    I followed all the steps until cloning and got this message :
    Could not find script.
    Did you provide the correct scriptId?

    Are you logged in to the correct account with the script?
    I can answer YES to both questions. I tried with an empty GAS ans also an empty GAS created from a Sheet. Same result.
    Any Idea ?

    • @getitdonetube
      @getitdonetube  3 роки тому

      Make sure you use the same Google account for both.

  • @hernanbalderas2791
    @hernanbalderas2791 2 роки тому

    Hey bro, I got a problem because it doesnt recognize clasp comands. When I try to check the version after the installation, it shows the error ""bash: clasp: command not found"
    I have node v16.13.1 and npm v8.1.2. Do you know a possible solution to this?

    • @getitdonetube
      @getitdonetube  2 роки тому

      You need to install clasp. If you did then it didn't work, so try again.

  • @LatinosHablandoInglés
    @LatinosHablandoInglés 2 роки тому

    Hi my bro, I get this error when executing the push command: No valid D:\Proy Act\3.Google\Google Apps Script\Fdo\IEva\evcPRD\.clasp.json project file. You may
    need to `create` or `clone` a project first. you can help?

  • @stukey9751
    @stukey9751 4 роки тому

    Still quite new to this but, if you made a web app with a form that updated a spreadsheet, could you run it on a text editor local host server and it would still update the spreadsheet from there?

    • @getitdonetube
      @getitdonetube  4 роки тому

      Yes, you can.

    • @stukey9751
      @stukey9751 4 роки тому

      @@getitdonetube thanks for the reply. I've tried it but it doesnt seem to be working, think I am missing a few things do I need a google apps script api? When I inspect the page on the local host im getting an error saying 'google is not defined' I think this is referring to the google.script.run.withSuccessHandler function in my code, is this because apps script is executed on the google cloud server so therefore cant be executed locally, any help would be really appreciated?

    • @getitdonetube
      @getitdonetube  4 роки тому +1

      You can't run the HTML locally. You can make changes to the code, but you still have to open Google's dev url for your Web App in the browser to test it.

  • @alwinvarghese2132
    @alwinvarghese2132 3 роки тому

    Any syntax highlighter for Google script in vscode?

    • @getitdonetube
      @getitdonetube  3 роки тому

      I'm not aware of any. JavaScript is not good enough for you?

  • @riverscuomo
    @riverscuomo 3 роки тому +2

    I had to install an older version of Clasp to get it to work. npm install -g @google/clasp@2.3.1 The latest version didn't work--at least for me, on Windows. EDIT: then I got an error at the step for installing TypeScript definitions for Apps Script in my project's folder. (After this command: - `npm i -S @types/google-apps-script`.) I managed to fix this by reinstalling Python. (I noticed that somewhere in the process of installing npm, another copy of Python had been installed in another location and was causing some confusion.)

  • @sousomaisumsilva
    @sousomaisumsilva 3 роки тому

    I had some problems with my installation. Basically the system informs that the script execution is disabled in system:
    " clasp : O arquivo C:\Users\myComputer\AppData\Roaming
    pm\clasp.ps1 não pode ser carregado porque a execução de scripts foi desabilitada neste sistema. Para obter mais informações,
    consulte about_Execution_Policies em go.microsoft.com/fwlink/?LinkID=135170.
    No linha:1 caractere:1
    + clasp -v
    + ~~~~~
    + CategoryInfo : ErrodeSegurança: (:) [], PSSecurityException
    + FullyQualifiedErrorId : UnauthorizedAccess

    • @skywallalp
      @skywallalp 3 роки тому

      You may try with cmd terminal in vscode or command prompt in windows instead of powershell terminal.

  • @BB-um4hp
    @BB-um4hp 4 роки тому

    Can pls help me its very urgent. I have installed clasp and it is in C:\Users\Admin\AppData\Roaming but my Virtual Studio workspace is E:\workspace.
    I have put those folder in E: but still I am not able to run it on Virtual Studio
    Can pls pls help me

    • @getitdonetube
      @getitdonetube  4 роки тому

      Refer to this video how to properly install node and vscode ua-cam.com/video/4UYe5aMHXfs/v-deo.html

    • @getitdonetube
      @getitdonetube  4 роки тому

      And then use vscode terminal to do everything

  • @bocobox
    @bocobox 4 роки тому

    stuck in clasp clone.. windows should go with command prompt?

    • @getitdonetube
      @getitdonetube  4 роки тому

      Check this out first ua-cam.com/video/4UYe5aMHXfs/v-deo.html

    • @getitdonetube
      @getitdonetube  4 роки тому

      Let me know if you still have problems after that.

    • @bocobox
      @bocobox 4 роки тому

      @@getitdonetube finally get it done. frustrating with set-up as a beginner. This thing "Set-ExecutionPolicy" hold me back. Anyway, now I am excited to follow up your new channel. really appreciated it. and hope your new one attract more viewers.

  • @waitwhat7373
    @waitwhat7373 3 роки тому +1

    Great tutorial! Thanks a lot!