Run it in ExtendScript app, or similar, and see if it will show you where the error is - it's possible that the language for a particular part has changed.
Hi @ChitraKathak, I don't know the answer, but it might help if you could you please try to run the following one-line script, just to check if *every* script will get the error. Save it as a text file called "test-script.js", and in Illustrator choose File > Scripts > Other Script to select and run it.
alert('This script ran without error, so not all scripts get the error.');
If it's okay for you to share one or two scripts that get errors please do. We will see if they run properly for us.