catalyst / catalyst-moodle-workflows

5 stars 10 forks source link

Using JS + AMD build, makes Catalyst CI give build errors #137

Closed fulldecent closed 5 days ago

fulldecent commented 5 days ago

When attempting to add JS + AMD files into the repo, it produces build errors with Catalyst.

Here is one such run:

https://github.com/fulldecent/moodle-local_plugin_template/actions/runs/11916079633/job/33207931334

We are not sure if it is expected that we will include the built JS (which I think is the correct Moodle best practice).

dmitriim commented 5 days ago

Error: File is stale and needs to be rebuilt: amd/build/canvas_confetti.min.js.map @fulldecent This means that version of node/dependencies you use locally are different to those used in Moodle version you run the test on. Please make sure you built your js in Moodle 4.5?

dmitriim commented 5 days ago

Alternatively you can use disable_grunt option to suppress this error. Usually handy when you support few version for your plugin and CI starts complaining about JS in the latest and you don't really want to rebuild js.

marharyta-morozova commented 4 days ago

Error: File is stale and needs to be rebuilt: amd/build/canvas_confetti.min.js.map @fulldecent This means that version of node/dependencies you use locally are different to those used in Moodle version you run the test on. Please make sure you built your js in Moodle 4.5?

Hi, @dmitriim

Yes, the JS build was on Moodle 4.5, with the Node.js and Grunt setup based on the Moodle documentation.

Additionally, to resolve the issue, the recommended approach from here was followed:

nvm install && nvm use && npm install from the Moodle root and /buid/ was rebuilt after that to make sure.

However, even after that, the CI issue remains unresolved.

marharyta-morozova commented 4 days ago

Already found this issue in README