Chapter 2: Setting up the environment for Clasp

* If you need help with the content of this article for work or development, individual support is available.

What you will be able to do in this chapter:

  • Make your PC "ready for programming"
  • Install Clasp (tool to communicate with Google)
  • Time required: 20-30 minutes (including download wait time)
  • Stumbling block: Feeling anxious "Is this okay?" during installation (Default is OK for everything!)

In this chapter, we will prepare to turn your computer into the "strongest automation workshop". Specifically, we will install three tools: Node.js, Clasp, and VS Code.

1. Creating a Development Environment = "Your Workshop"

From now on, we will prepare "tools for programming" on your computer.

I'll be honest. This is the most difficult part. Many people give up on "environment setup". Because unfamiliar screens and terms appear.

But please rest assured. It is "just a procedure". Like a cooking recipe, if you do as written, you will definitely succeed. Once you get over this, a fun "automation life" is waiting. Let's do our best together!

There are 3 necessary tools. Please imagine the role of each.

  1. Node.js: "Engine"
    • Power source to run Clasp. Nothing moves without this.
  2. Clasp: "Interpreter Tool"
    • The protagonist of this series that connects your computer and Google's server.
  3. VS Code: "High-function Workbench"
    • Editor for writing code. It is also a place to borrow the power of AI.

Let's install these in order.

2. Installation of Node.js (Engine)

Clasp actually does not work alone. It is a program that runs on an engine called Node.js. First, install this engine on your computer.

Procedure

  1. Access Node.js Official Site.
  2. Click the button labeled "LTS (Recommended)" among the buttons displayed largely on the screen to download.
    • Choosing "LTS (Long Term Support)" instead of "Latest" is an iron rule in the programming world that "it is stable and has few troubles".
  3. Double-click the downloaded file (installer) to start it.
  4. Proceed by pressing the "Next" button several times.
    • Many checkboxes etc. will appear on the way, but everything is fine with default (as is).
  5. Finally press "Finish" to complete.

Check if installed (Important!)

Here we use "Terminal" for the first time. Let's rev the engine and check if the installation was successful.

  • Windows users: Search for "PowerShell" in the Start menu and open it.
  • Mac users: Search for "Terminal" in Spotlight (Command + Space) and open it.

In the opened screen, type the following characters and press the Enter key.

node -v

Example of success:

v20.10.0

The number varies depending on the version, but if a number starting with v appears, it is successful!

Incidentally, let's check another command.

npm -v

Example of success:

10.2.3

If a number appears here too, it is OK.

If it doesn't work (Troubleshooting)

If red text errors such as command not found or The term 'node' is not recognized... appear, try the following steps.

  1. Restart Terminal: Close the opened black screen once and open it again. (This is the most common cause)
  2. Restart PC: If that doesn't work, restart the computer itself.
  3. Reinstall: If that doesn't work, uninstall Node.js once and try installing it again.

3. Installation of Clasp (Tool)

When you install Node.js, a tool called npm comes with it as a bonus. This is like an "App Store for programmers". Use this to install Clasp.

In the terminal earlier, type the following spell and press Enter.

npm install -g @google/clasp

Meaning of this command

  • npm install: Command "Install from App Store!"
  • -g: Abbreviation for "Global". It means "Make it usable from anywhere on this computer!". If you forget this, Clasp can only be used in specific folders.
  • @google/clasp: Name of the tool you want to install.

Characters flow on the screen, but if there is no word Error at the end, it is OK. Let's type the following for confirmation.

clasp -v

Example of success:

2.4.2

If such a version number is displayed, preparation of Clasp is complete!

If Windows says "Script execution is disabled"?

When typing clasp command in Windows PowerShell, A red error running scripts is disabled on this system... may appear.

In that case, copy and paste the following command and press Enter. (It is a command to loosen the security setting called "Execution Policy" a little for development)

Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser

If asked "Do you want to change the execution policy?", type Y (Yes) and press Enter. Now clasp -v should work.

4. Preparation of VS Code (Workbench)

Finally, let's install VS Code, a "workbench" for writing code. You can write code in Windows "Notepad", but using VS Code increases writing speed by 10 times, such as "telling you mistakes" and "color-coding for easy viewing".

  1. Download and install from VS Code Official Site.
  2. After installing and starting, click the square icon (Extensions) on the left.
  3. Put the following names in the search bar and press the "Install" button for each.

Essential Extensions

  • Google Apps Script:
    • When writing GAS code, it does color coding and input completion (function to show candidates when typing halfway).

5. Strongest Partner: Introduction of GitHub Copilot (AI Agent)

This is the most important part. As of 2025, programming has changed from the era of "humans typing everything by hand" to the era of "creating with AI Agent". Hand-typing is important to learn the basics, but using AI is natural in practice.

What is GitHub Copilot?

Think of it as a "super excellent senior engineer" sitting next to you. Just by commenting "I want to write this kind of processing", it suggests code. Furthermore, if you use the chat function, it listens to instructions such as "Fix this error" and "Write shorter".

Introduction Procedure (As of December 2025)

  1. Search for "GitHub Copilot" in the VS Code extension menu and install it.
  2. After installation, a notification "Sign in to GitHub" appears in the lower right, so click and log in.
  3. (If not yet contracted) The browser opens, so perform free trial or plan contract (about 10 dollars a month).
    • Free for students.
    • AI editors other than Copilot such as Cursor are also popular, but first we recommend the industry standard VS Code + Copilot.

Just by putting this in, "lonely work" changes to "pair programming". The biggest cause of beginners giving up is "cannot solve errors", but if Copilot is there, you can solve it just by asking "What does this mean?". It is no exaggeration to say "Agent essential". Please introduce it.

6. Frequently Asked Questions (Q&A)

Q1. An error occurred during installation!

A. Calm down and read the error message. Common is "no permission" error. In Windows, "Run as administrator", in Mac, adding sudo before the command may solve it. Copying the error text and asking ChatGPT or Copilot "What does this error mean?" is the fastest.

Q2. Is it okay if the Node.js version is old?

A. Use the new LTS version if possible. If it is too old, Clasp may not work.

Q3. Does Copilot cost money?

A. Basically paid, but cost-effectiveness is outstanding. If you think you can hire a "tutor who can ask questions 24 hours a day" for a little over 1000 yen a month, it is exceptionally cheap. First, please experience the power with a free trial.

7. Understanding Check Quiz

Q1. What is the name of the "engine" to run Clasp? A. Python B. Node.js C. Java

Q2. What is the command to install Clasp? A. npm install -g @google/clasp B. download clasp C. install google-apps-script

Q3. What is the name of the "AI partner" recommended as a development style in 2025? A. Siri B. Alexa C. GitHub Copilot

Answer Check (Click to open)

Q1: B Node.js is the engine.

Q2: A Install using npm command. Don't forget -g!

Q3: C Developing with GitHub Copilot (Agent) is the modern standard.


Now, the "strongest development environment" same as professional engineers is ready! Next, finally connect Google account and Clasp.


What to do in the next chapter:

  • Turn on Google Apps Script API (Turn on the switch)
  • Authenticate with clasp login command
  • Make a "duplicate key" and give it to PC

>> Next Chapter: Chapter 3 Connecting Google Account and Clasp

Series Index

ZIDOOKA!

Need help with the content of this article?

I provide individual technical support related to the issues described in this article, as a freelance developer. If the problem is blocking your work or internal tasks, feel free to reach out.

Support starts from $30 USD (Estimate provided in advance)
Thank you for reading

コメントを残す

メールアドレスが公開されることはありません。 が付いている欄は必須項目です

Policy on AI Usage

Some articles on this site are written with the assistance of AI. However, we do not rely entirely on AI for writing; it is used strictly as a support tool.