🏠 back to Observable

PSA: Lock down your three.js versions!

In the past weeks I have seen several notebooks (including my own) that stopped working because they had imported the three library without a version identifier, thus defaulting to the latest release.

Three.js is moving fast and breaking things, but here’s what you can do:

  • For new notebooks: Visit @tom’s Module Require Debugger to fetch the require statement, complete with version identifier (although just require("three@VERSION") works as well).
  • For broken notebooks:
    1. Open your notebook’s version history and check the date of the latest change.
    2. Head over to the three.js page on npm and click the “Versions” tab, then hover over the version ages to find the latest version before your last change.
    3. Add the version to your require statement.

Happy coding! :smiley:

Edit: You may also want to check the Migration Guide for individual releases.