Title: Uncaught SyntaxError: Cannot use import statement outside a mod
Last modified: February 3, 2021

---

# Uncaught SyntaxError: Cannot use import statement outside a mod

 *  [shopmaster](https://wordpress.org/support/users/serdarozbilen/)
 * (@serdarozbilen)
 * [5 years, 4 months ago](https://wordpress.org/support/topic/uncaught-syntaxerror-cannot-use-import-statement-outside-a-mod/)
 * Hello,
 * After the latest update we ara getting errror on console.
 * superpwa-sw.js:8 Uncaught SyntaxError: Cannot use import statement outside a 
   mod
 * import*as googleAnalytics from ‘workbox-google-analytics’;if(googleAnalytics){
   try{googleAnalytics.initialize();}catch(e){}}
 * How canw e solve this ?
    Regards
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Funcaught-syntaxerror-cannot-use-import-statement-outside-a-mod%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 3 replies - 1 through 3 (of 3 total)

 *  Plugin Author [SuperPWA](https://wordpress.org/support/users/superpwa/)
 * (@superpwa)
 * [5 years, 4 months ago](https://wordpress.org/support/topic/uncaught-syntaxerror-cannot-use-import-statement-outside-a-mod/#post-14000940)
 * We inspected your site and didn’t encounter any issue [https://prnt.sc/y8s244](https://prnt.sc/y8s244).
   Can you please check once whether having the same issue or not. Then do let us
   know.
 *  Thread Starter [shopmaster](https://wordpress.org/support/users/serdarozbilen/)
 * (@serdarozbilen)
 * [5 years, 4 months ago](https://wordpress.org/support/topic/uncaught-syntaxerror-cannot-use-import-statement-outside-a-mod/#post-14001011)
 * Hello,
    Thanks for reply. Can you refresh page. You will see error after refresh
 *  Plugin Author [SuperPWA](https://wordpress.org/support/users/superpwa/)
 * (@superpwa)
 * [5 years, 4 months ago](https://wordpress.org/support/topic/uncaught-syntaxerror-cannot-use-import-statement-outside-a-mod/#post-14007273)
 * We tried by refreshing the page but didn’t encounter any such issue. Please check
   the following video link for reference [https://monosnap.com/direct/N2nFgyNgxNiPUZozcNxt2I8uFikaig](https://monosnap.com/direct/N2nFgyNgxNiPUZozcNxt2I8uFikaig).
   Can you please check it once in other device and let us know back.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Uncaught SyntaxError: Cannot use import statement outside a mod’ is closed
to new replies.

 * ![](https://ps.w.org/super-progressive-web-apps/assets/icon-128x128.png?rev=1842063)
 * [Super Progressive Web Apps](https://wordpress.org/plugins/super-progressive-web-apps/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/super-progressive-web-apps/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/super-progressive-web-apps/)
 * [Active Topics](https://wordpress.org/support/plugin/super-progressive-web-apps/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/super-progressive-web-apps/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/super-progressive-web-apps/reviews/)

 * 3 replies
 * 2 participants
 * Last reply from: [SuperPWA](https://wordpress.org/support/users/superpwa/)
 * Last activity: [5 years, 4 months ago](https://wordpress.org/support/topic/uncaught-syntaxerror-cannot-use-import-statement-outside-a-mod/#post-14007273)
 * Status: not resolved