30 days lost in space - Serial.begin error

My grandson is trying to do the 30 days lost in space. He is working on Day 6 and we have encounter an error. We are using Ardrino 2.3.11, CLI Version 1.6.0

The instructions say to use: Serial.begin(9600); When we put that line into the code, we get a compile error saying: error: 'Serial' does not name a type I have pasted the code below. Can someone suggest what we are missing? Many thanks in advance for your insight.

#include "Arduino.h" const byte PHOTORESISTOR_PIN = A0; const unsigned int MIN_DELAY = 50; // 50ms shortest blink delay const unsigned int MAX_DELAY = 500; // 500ms longest blink delay void setup() { pinMode(LED_BUILTIN, OUTPUT); // Control the built-in LED pinMode(PHOTORESISTOR_PIN, INPUT); // Read from photoresistor Serial.begin(9600); // Initialize Serial Monitor at 9600 baud }