Re: Attempting to join to one file

Skip to first unread message

Michael J Kauzmann

Jan 3, 2022, 12:31:33 PM1/3/22
to Bob Bumgarner, Developing Interactive Simulations in HTML5

Hello Bob,

Thanks for reaching out to PhET and sorry for the trouble. That error is from our linting software (code quality enforcer). At PhET we have a need to seed a sim to have identical runtimes. Because of this, we use a single instance of Random called `DOT/dotRandom`. You can take a look at usages of that and see if it would work for you.

Otherwise, this is just a lint error, and not an actual problem with the code. To get around it you can do any of the following:
* add `--lint=false` to the build command, like `grunt --brands=adapted-from-phet --lint=false`
* add `// eslint-disable-line bad-sim-text` to the end of the line that you are creating or using Random on. If you search for this string in our codebase, you should see other usages just like yours where we are alright with an unseeded random instance (like

I hope this is helpful. Please let us know if you run into any more issues.


Michael Kauzmann
PhET Interactive Simulations
University of Colorado
Pronouns: he/him

On Wed, Dec 29, 2021 at 9:44 AM Bob Bumgarner <> wrote:
My simulation is hung up on one message which holds up the grunt process to compile the simulation into a single file.

The command in the appropriate folder:
grunt --brands=adapted-from-phet

  120:25  error  bad code text: "new Random()"  bad-sim-text

This also seems to occur when I attempt to use the Math.random() in the same function.

Any help about what this message is, how it can be fixed, or where I can read more about this issue would be much appreciated.

You received this message because you are subscribed to the Google Groups "Developing Interactive Simulations in HTML5" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
To view this discussion on the web visit
Reply all
Reply to author
0 new messages