Skip to main content

SenchaCmd build process and the YUI C2009 issue

This blog post might be outdated!
This blog post was published more than one year ago and might be outdated!
· 2 min read
Florian Horn
Business Analyst Digital Sales

Currently, we have to refactor some parts of an ExtJS4 application for one of our clients. During the refactoring process we renamed some namespaces to fit the current naming schemes, which changed a little bit over the time.

We also run a PHP backend accepting REST calls from the ExtJS4 application, and we already refactored the backend application in the same way. Among other things we have a slice called "Import", and we renamed the related namespace in the frontend to contain the "Import" part, resulting in something like this: "". That was not a good idea.

Starting the SenchaCmd building process, we issued a lot of "YUI C2009" errors in an unknown file. I know, very helpful...

The "unknown file" might originate from the concatenation process of the javascript files which has not yet finished. After searching for the issue I came across a thread in the Sencha Forum pointing me in the right direction.

The real problem is a bit nasty, so it is caused by a conflict with the Javascript Reserved Words. So the word "import" is a reserved word and issued the problems occurring as "YUI C2009" errors in the building process.

We solved issue renaming the namespace to "importer", and the errors vanished.