With the latest version of mermaid installed (version 10.0.2), the CircleCI tests fail. This is caused by a webpack compilation issue that emerges from some incompatibility between TOP's webpacker config and mermaid's exports, which are ESM only in v10+.
With the latest version of mermaid installed, you can recreate the errors that happen in CI locally by running NODE_ENV=test RAILS_ENV=test rails webpacker:compile.
The three things that need to happen to resolve this issue:
Run yarn install mermaid to install the latest version of mermaid.
Make sure that NODE_ENV=test RAILS_ENV=test rails webpacker:compile runs without errors. This should guarantee that it will pass CI. This likely involves some small change to the webpacker config to properly grab mermaid's exports. Reading through this conversation in the mermaid PR should help with getting the full context for this problem.
We recently added support for mermaid diagramming to site. See here for the PR: https://github.com/TheOdinProject/theodinproject/pull/3708
With the latest version of mermaid installed (version 10.0.2), the CircleCI tests fail. This is caused by a webpack compilation issue that emerges from some incompatibility between TOP's webpacker config and mermaid's exports, which are ESM only in v10+.
With the latest version of mermaid installed, you can recreate the errors that happen in CI locally by running
NODE_ENV=test RAILS_ENV=test rails webpacker:compile
.The three things that need to happen to resolve this issue:
yarn install mermaid
to install the latest version of mermaid.await mermaid.run()
. This is due to changes in the mermaid API in v10.NODE_ENV=test RAILS_ENV=test rails webpacker:compile
runs without errors. This should guarantee that it will pass CI. This likely involves some small change to the webpacker config to properly grab mermaid's exports. Reading through this conversation in the mermaid PR should help with getting the full context for this problem.