# AMO update version - validation error (1st line of an external class file: the import statement of needed functions)

**URL:** <https://discourse.mozilla.org/t/amo-update-version-validation-error-1st-line-of-an-external-class-file-the-import-statement-of-needed-functions/52389>\
**Category:** addons.mozilla.org\
**Created:** [January 21, 2020, 12:37am UTC](https://discourse.mozilla.org/t/amo-update-version-validation-error-1st-line-of-an-external-class-file-the-import-statement-of-needed-functions/52389 "2020-01-21T00:37:34Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![pingerofpong](https://sea1.discourse-cdn.com/flex001/user_avatar/discourse.mozilla.org/pingerofpong/32/20215_2.png) [@pingerofpong](https://discourse.mozilla.org/u/pingerofpong)\
**Post date:** [January 21, 2020, 12:37am UTC](https://discourse.mozilla.org/t/amo-update-version-validation-error-1st-line-of-an-external-class-file-the-import-statement-of-needed-functions/52389/1 "2020-01-21T00:37:34Z")

</div>

I’m using Firefox (user) 72.0.2 (64-bit) and new Class structure with public fields inside the class. The class is in an external file and is accessed via an import {ClassName} statement. I have NOT declared an html script link of type module - but, my app/class **WORKS WELL** when testing it. I test it by adding it thru debug|add temporary file. The class file has an import (functions…) as the first statement (prior to the class definition).

This class structure should be valid to the AMO linter if it works in my browser version???

---

<div class="post-metadata">

**Author:** ![jorgev](https://avatars.discourse-cdn.com/v4/letter/j/71c47a/32.png) [@jorgev](https://discourse.mozilla.org/u/jorgev)\
**Post date:** [January 21, 2020, 8:16pm UTC](https://discourse.mozilla.org/t/amo-update-version-validation-error-1st-line-of-an-external-class-file-the-import-statement-of-needed-functions/52389/2 "2020-01-21T20:16:45Z")

</div>

The add-ons linter doesn’t fully support ES6, it seems. There are some issues already filed for it, [like this one](https://github.com/mozilla/addons-linter/issues/2978).

---

<div class="post-metadata">

**Author:** ![freaktechnik](https://sea1.discourse-cdn.com/flex001/user_avatar/discourse.mozilla.org/freaktechnik/32/37766_2.png) [@freaktechnik](https://discourse.mozilla.org/u/freaktechnik)\
**Post date:** [January 21, 2020, 9:14pm UTC](https://discourse.mozilla.org/t/amo-update-version-validation-error-1st-line-of-an-external-class-file-the-import-statement-of-needed-functions/52389/3 "2020-01-21T21:14:21Z")

</div>

> [@pingerofpong](#):
>
> I have NOT declared an html script link of type module

So how else are you loading your JS file then?

---

<div class="post-metadata">

**Author:** ![pingerofpong](https://sea1.discourse-cdn.com/flex001/user_avatar/discourse.mozilla.org/pingerofpong/32/20215_2.png) [@pingerofpong](https://discourse.mozilla.org/u/pingerofpong)\
**Post date:** [January 25, 2020, 3:48am UTC](https://discourse.mozilla.org/t/amo-update-version-validation-error-1st-line-of-an-external-class-file-the-import-statement-of-needed-functions/52389/4 "2020-01-25T03:48:22Z")

</div>

Thank you! Your link to mozilla/addons-linter is exactly the info I needed. I will be patient - and glean some virtue.

---

<div class="post-metadata">

**Author:** ![pingerofpong](https://sea1.discourse-cdn.com/flex001/user_avatar/discourse.mozilla.org/pingerofpong/32/20215_2.png) [@pingerofpong](https://discourse.mozilla.org/u/pingerofpong)\
**Post date:** [January 25, 2020, 3:52am UTC](https://discourse.mozilla.org/t/amo-update-version-validation-error-1st-line-of-an-external-class-file-the-import-statement-of-needed-functions/52389/5 "2020-01-25T03:52:56Z")

</div>

jorgev provided me with the answer I needed. It appears there are still some linter problems when updating thru AMO - regarding classes.

In answer to your question (how without module statement): via es6 import statement.
