No wonder, you made more than a few errors in the first line alone. ;-)
First of all, it's not "package" (that appears to be a reserved JS word -- you learn something useful every day), it's "packageForPrint". Next, that is a function; you can't use "with" with functions, only with properties. Next, you forgot a lot of required parameters.
Putting it all together as it should be gives me this line
>app.activeDocument.packageForPrint("c:\\",true,true,true,true,true,true);
which works on my system. The sequence of true's can even be amended with two more parameters, a version comment string and a Force Save flag, but at this point you should check the JS help for its correct syntax and the meaning of all these trues.
(A later thought: you write
>I made this script
while the 3 lines hardly qualify as a complete script. Maybe you should know that "myDocument" and "pathToMyFile" can also throw an error, as these variables are undefined and you have to give them a reasonable value first. That's why I used "app.activeDocument".
Of course, if this is a mere snippet of a complete script, it's no problem, but you should have mentioned that.)