Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Type error: Cannot find name 'DateTime' #1

Open
endvine opened this issue Jul 11, 2024 · 1 comment
Open

Type error: Cannot find name 'DateTime' #1

endvine opened this issue Jul 11, 2024 · 1 comment

Comments

@endvine
Copy link

endvine commented Jul 11, 2024

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
Copy link

dkbosei00 commented Aug 10, 2024

@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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants