phetsims / sherpa

Third-party libraries and dependencies for PhET Simulations
http://scenerystack.org/
Other
8 stars 8 forks source link

Cannot find module empty #91

Closed samreid closed 3 years ago

samreid commented 3 years ago

From https://github.com/phetsims/chipper/issues/1085 @zepumph reported build failures, perhaps from the translation build:

Build failure: Error: Build aborted, Error: grunt --brands=phet --repo=graphing-quadratics build-images in ../chipper failed with exit code 3
stdout:
Loading "Gruntfile.js" tasks...ERROR
>> Error: Cannot find module './empty'
>> Require stack:
>> - /data/share/phet/phet-repos/sherpa/lib/jsondiffpatch-v0.3.11.umd.js
>> - /data/share/phet/phet-repos/chipper/js/phet-io/phetioCompareAPISets.js
>> - /data/share/phet/phet-repos/chipper/js/grunt/Gruntfile.js
>> - /data/share/phet/phet-repos/chipper/Gruntfile.js
>> - /data/share/phet/phet-repos/chipper/node_modules/grunt/lib/grunt/task.js
>> - /data/share/phet/phet-repos/chipper/node_modules/grunt/lib/grunt.js
>> - /usr/lib/node_modules/grunt-cli/bin/grunt
Warning: Task "build-images" not found.  Use --force to continue.

Aborted due to warnings.
. Sim = graphing-quadratics Version = 1.2.1 Brands = phet Locales = iw Shas = {"comment":"# graphing-quadratics 1.2.1 Thu Sep 23 2021 02:22:47 GMT-0600 (Mountain Daylight Time)","assert":{"sha":"f360fa1bd09a47b3c9e49cd90c8dddd136a13e0c","branch":"HEAD"},"axon":{"sha":"d09f8f50b1a8b97145612bece9e7d91a20e05b28","branch":"HEAD"},"brand":{"sha":"0c723e76a7bad4344cb588c486ae41d0f7fc4995","branch":"HEAD"},"chipper":{"sha":"d84a8593cdba1c8e450f6a96157b1a60960a67a7","branch":"HEAD"},"dot":{"sha":"aacdd9db44ef332395aa95b0b134b6032d5b8a59","branch":"HEAD"},"graphing-lines":{"sha":"7bc6a8269b9571a7788bee67edb62642f9f28770","branch":"HEAD"},"graphing-quadratics":{"sha":"fa3df61e1fbd9bf4ea1931056037840fb6e6116f","branch":"HEAD"},"joist":{"sha":"843feeb1a1c9e32194961faec92e1d15523bbcf6","branch":"HEAD"},"kite":{"sha":"a5a45cba30bc83d0400d83f03c7e4ffe06d75501","branch":"HEAD"},"perennial-alias":{"sha":"695911d0604c2bd18e9031ea4f5b26d6586bd025","branch":"HEAD"},"phet-core":{"sha":"354cc8ce376a142df9f579e2e44e438a07b56605","branch":"HEAD"},"phet-io":{"sha":"5ff1615454c98ae6bf43ccb9149ec17282d66c70","branch":"HEAD"},"phet-io-client-guides":{"sha":"1a588f974609e9665b4bdeb6c839762b7a60a4fd","branch":"HEAD"},"phet-io-wrappers":{"sha":"dd9755228f1eff6bd01448d2c6825f2e1471fcbc","branch":"HEAD"},"phetcommon":{"sha":"702911858bafc8e772a2b9d8747ef599cc2bce5c","branch":"HEAD"},"phetmarks":{"sha":"589cdbe7c499adfc1cc478b11340fc0ac61ff93d","branch":"HEAD"},"query-string-machine":{"sha":"12cfdab188ee5be9a8c1932411ad41da8b175c88","branch":"HEAD"},"scenery":{"sha":"dfc38683f72c688970cd03c26843685db92a3894","branch":"HEAD"},"scenery-phet":{"sha":"7a6b0480e7b81dc39ec48dc369bd951f59df9523","branch":"HEAD"},"sherpa":{"sha":"ec49f43aee29c836c13884be095e2772bc9faaa0","branch":"HEAD"},"studio":{"sha":"6000377b355bd90674414eae4fa4f695dc7fb40b","branch":"HEAD"},"sun":{"sha":"ca4c2fb861e678adc960a84f67b90875eaab3e1c","branch":"HEAD"},"tambo":{"sha":"e4fda961e4983c1f10aceffff14d0c91e0f50c31","branch":"HEAD"},"tandem":{"sha":"dcea61ce3483056a7d4750d3c51aa3f6d20365cd","branch":"HEAD"},"twixt":{"sha":"35e83120131ca1265e72d84c822a21bb557e08cb","branch":"HEAD"},"utterance-queue":{"sha":"c5024988addef3818199c1bad305d4b9c6e1e385","branch":"HEAD"}}

I checked that empty.js was committed properly as part of https://github.com/phetsims/chipper/issues/1085, I'm not sure what's wrong.

samreid commented 3 years ago

I tried grunt --brands=phet --repo=graphing-quadratics build-images from my chipper and didn't see any problems. Also, I noticed the locales for this build is "iw". @zepumph @jbphet or @jonathanolson can you please recommend how to investigate?

zepumph commented 3 years ago

I ran:

cd ../graphing-quadratics/
git checkout fa3df61e1fbd9bf4ea1931056037840fb6e6116f
grunt checkout-shas
grunt --brands=phet --repo=graphing-quadratics build-images

And ran into no problems.

I went onto phet-server and pulled sherpa, and it was already up to date.

Here is my best guess:

I wonder is this is a case where chipper isn't getting npm update called on it correctly, or if sherpa isn't getting checked out to an older sha appropriately.

The graphing-quadratics sha that was used in the failed build above is from Wed, 9/21/21, and this new patch is only on master. Why would shas checked out for that older version still have chipper's file pointing to the sherpa version of jsondiffpatch?

zepumph commented 3 years ago

We got over 10 failed builds because of this guy over the weekend, so we should solve this quickly.

zepumph commented 3 years ago

After seeing that it is actually 22 failed builds this weekend, I decided to at least put in a workaround to lazily require the script that is needed the non-existent sherpa file.

samreid commented 3 years ago

From the require stack trace, we can see that chipper was loading sherpa/lib/jsondiffpatch-v0.3.11.umd.js. However, it says it was using the SHA for chipper as d84a8593cdba1c8e450f6a96157b1a60960a67a7, which loads jsondiffpatch from chipper/node_modules. So is the translation build process using chipper master or something? And thanks for the lazy require for now.

samreid commented 3 years ago

@zepumph @jonathanolson @mattpen and I discussed this today. We determined the problem was that chipper was checked out to master for deploy-images, but dependencies (like sherpa) were not checked out to master, which caused this discrepancy. @mattpen said the translations were most likely fully deployed, and there was just a failure in the deploy images step (which is not needed for translations). @jonathanolson will commit the fix, and @mattpen will review the 22 submissions to make sure they are complete.

mattpen commented 3 years ago

I verified that all sims had a localized file and a database entry. Here is the list of build requests:

number-line-distance sq
energy-skate-park fa
energy-skate-park-basics fa
collision-lab sq
bending-light ar 
proportion-playground iw
make-a-ten iw
graphing-slope-intercept iw
graphing-quadratics iw
function-builder-basics iw
function-builder iw
fractions-mixed-numbers iw
fractions-intro iw
fractions-equality iw
equality-explorer-two-variables iw
equality-explorer-basics iw
equality-explorer iw
build-a-fraction iw
area-model-multiplication iw
area-model-introduction iw
area-model-decimals iw
ratio-and-proportion iw

I believe that all the translations that failed the build were in actuality a success, and that we do not need to conteact translators to resubmit.

samreid commented 3 years ago

I think this issue can be closed. Leaving to remaining assignees to see if there is anything else.

jbphet commented 3 years ago

Nothing else from my perspective.