phetsims / build-an-atom

"Build an Atom" is an educational simulation in HTML5, by PhET Interactive Simulations.
http://phet.colorado.edu/en/simulation/build-an-atom
GNU General Public License v3.0
11 stars 10 forks source link

Uncaught TypeError: Cannot read property 'length' of null #206

Open huangjian199304 opened 4 years ago

huangjian199304 commented 4 years ago

when is use Grunt to package these files, then use the nginx to start, but when i drag the proton from the bucket into the dash circle, i got this error and my web page was crashed. can anybody help me to check that? 711

huangjian199304 commented 4 years ago

oh, forgot to say that, i got this error in first scene Atom

huangjian199304 commented 4 years ago

@jbphet @samreid

samreid commented 4 years ago

I ran the grunt command and it built successfully:

~/github$ cd build-an-atom/
~/github/build-an-atom$ grunt
Running "lint-all" task

Running "report-media" task

Running "clean" task

Running "build" task
Building runnable repository (build-an-atom, brands: phet, phet-io)
Building brand: phet
>> require.js optimization for brand: phet complete (4654315 bytes)
>> Minification for phet complete
>> Production scripts: 1946721 bytes
Building brand: phet-io
>> require.js optimization for brand: phet-io complete (4784034 bytes)
>> Minification for phet-io complete
>> Production scripts: 1963871 bytes

Done.

Then I opened http://localhost/build-an-atom/build/phet/build-an-atom_en_phet.html in the browser and was able to drag protons into the atom.

Are you able to run http://localhost/build-an-atom/build-an-atom_en.html?brand=phet&ea locally? Do you see any errors or warnings during the build? Can you pull all repos to make sure everything is up to date? Can you please test the debug version by opening build-an-atom_all_phet_debug.html and report the error?