# Error: File is stale and needs to be rebuilt

Die [Moodle Plugin-CI ](https://kb.moodle-an-hochschulen.de/books/entwicklung/page/moodle-development#bkmrk-continuous-integrati)in den Github Actions können folgenden auf die Javascript-Dateien bezogenen Fehler melden:   
"Error: File is stale and needs to be rebuilt".

## Ursache

This means that version of node / dependencies you use locally are different to those used in the Moodle version you run the test on.

## Lösung

Make sure your local version is matching, easiest way to do it is to <span style="color: var(--ds-background-accent-red-bolder,#c9372c);">run `nvm install && nvm use && npm install` **from Moodle root**</span>, <span style="color: var(--ds-text-accent-green,#216e4e);">then navigate to your **plugin dir** and run <span style="color: var(--ds-text-accent-green-bolder,#164b35);">`npx grunt amd`</span></span>, and commit changes in minified files.

## Links / Quellen

[https://github.com/moodlehq/moodle-plugin-ci/issues/319](https://github.com/moodlehq/moodle-plugin-ci/issues/319)

[<span>https://github.com/catalyst/catalyst-moodle-workflows/tree/bbb7b5fba5f8304b8b07ad5534b666202d1751c8?tab=readme-ov-file#amd--grunt-bundling-issues</span>](https://github.com/catalyst/catalyst-moodle-workflows/tree/bbb7b5fba5f8304b8b07ad5534b666202d1751c8?tab=readme-ov-file#amd--grunt-bundling-issues)

---

Autorin: [Melanie Treitinger](https://forum.moodle-an-hochschulen.de/user/profile.php?id=35), Ruhr-Universität Bochum