pmndrs / ecctrl

🕹️ A floating rigibody character controller
MIT License
465 stars 49 forks source link

node modules file error on 1.0.78 #59

Closed cyango closed 1 month ago

cyango commented 1 month ago

Upgrading to this version gives this error:

image
ErdongChen-Andrew commented 1 month ago

Which version were you using where this issue wasn't present?

cyango commented 1 month ago

1.0.77 thsi error doesn't show up. But on the newest one it shows.

ErdongChen-Andrew commented 1 month ago

Emm... the only difference is the ts setup. Would you mind adding this line to your tsconfig.json: strictNullChecks: false? Let's see if this fixes the issue.

cyango commented 1 month ago

That seems to fix the ecctrl side but now i get issues on other parts of the my code, but i think it's not recommended:

"Setting strictNullChecks to true is generally recommended for a few reasons:

It helps catch null and undefined errors at compile time: These are some of the most common runtime errors in JavaScript. With strictNullChecks, you can catch these errors at compile time.

It makes the code more predictable: When strictNullChecks is true, you know that a variable can't be null or undefined unless its type says it can be. This makes the code easier to reason about.

It encourages better coding practices: With strictNullChecks, you're encouraged to check for null or undefined before using a variable. This leads to safer, more robust code." - chatGPT

cyango commented 1 month ago

I made a PR about this, that should fix it

cyango commented 1 month ago

I had to refactor my code to use strictNullChecks: false. Issue solved.