Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Illegal use of reserved word 'import'

Explorer ,
Sep 03, 2021 Sep 03, 2021

I wish to clean my illustrator script by splitting my script into smaller .js files but I seem to get this error when I want to import functions from other files. Any ideas? Does ai not allow this? Thanks!

TOPICS
Scripting
1.6K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Expert , Sep 03, 2021 Sep 03, 2021

 are your scripts part of an Extension?

 

for regular jsx scripts, use #include at the top of your main script, import is not used in the illustrator scripting context

Translate
Adobe
Community Expert ,
Sep 03, 2021 Sep 03, 2021

 are your scripts part of an Extension?

 

for regular jsx scripts, use #include at the top of your main script, import is not used in the illustrator scripting context

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Sep 03, 2021 Sep 03, 2021

Yes I've tried #include and it works. TY

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Oct 15, 2021 Oct 15, 2021

i am a novice and i don't understand it well。can i trouble to put a case?thanks!

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guide ,
Oct 15, 2021 Oct 15, 2021
LATEST
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines