fireship-io / linux-course

11 stars 2 forks source link

Type error: Cannot find name 'DateTime' #1

Open endvine opened 2 months ago

endvine commented 2 months ago

I keep getting this error when I try running npm run build

This has happened in CentOS and in Ubuntu.

 Linting and checking validity of types  ..Failed to compile.

./app/Guestbook.tsx:58:21
Type error: Cannot find name 'DateTime'.

  56 |       const record = await pb.collection('users').update(user.id, {
  57 |         message: message,
> 58 |         signed: new DateTime()
     |                     ^
  59 |       });
  60 |       console.log('Guestbook signed:', record);
  61 |     //   setLastMessage(message);
dkbosei00 commented 1 month ago

@endvine I was facing the same issue but that line is just for creating a timestamp. I changed new DateTime() to new Date() and it worked.