Is it possible to replace PHP with NodeJS?

No.

You can create your custom Node backend that communicates with WordPress via REST or GraphQL, but if you want to use WordPress’ functionality (such as add_filter, etc.), you need to use PHP.

See this as an opportunity to learn a new programming language.

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)