Purging Cashes

Purging Cashes

by Dalin Williams -
Number of replies: 3

Hello all, I have a question.

I was developing some JavaScript using AMD modules, and I attempted to  purge my cache to rid the old module. This led to the following error code, stating core/first is no longer found. Please note, this error still shows up days later.

GET http://216.249.119.168/moodle/lib/requirejs.php/1442863195/core/first.js req.load @ require.js:33context.load @ require.js:33Module.load @ require.js:28Module.fetch @ require.js:28Module.check @ require.js:28Module.enable @ require.js:28context.enable @ require.js:33(anonymous function) @ require.js:28(anonymous function) @ require.js:10each @ require.js:4Module.enable @ require.js:28Module.init @ require.js:28(anonymous function) @ require.js:33

require.js:14 Uncaught Error: Script error for: core/first

http://requirejs.org/docs/errors.html#scripterrormakeError @ require.js:14context.onScriptError @ require.js:33

Is there any reason why core/first goes permanently missing? Am I going about my development process wrong? Thanks.

Average of ratings: -
In reply to Dalin Williams

Re: Purging Cashes

by Dalin Williams -

I find it strange, because this is the method suggested by many (at least in their code); to clean the cache after every 'grunt' run... If anyone has suggestions I would appreciate it.

In reply to Dalin Williams

Re: Purging Cashes

by Bas Brands -
Picture of Core developers Picture of Peer reviewers Picture of Plugin developers Picture of Plugins guardians Picture of Testers

I had the same issue, googled it and found your post. Then started looking for the issue. It turned out I had a theme installed that had an uncompiled AMD plugin. After removing that plugin all was okay. So maybe the error happens because of something else in your codebase.

In reply to Dalin Williams

Re: Purging Cashes

by Chris Wharton -

Hi Dalin, when you are developing javascript for Moodle, make sure the debugging settings are enabled. This might be causing the issues.

// config.php
$CFG->yuicomboloading = false;
$CFG->cachejs = false;