systemjs / systemjs

Dynamic ES module loader

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Uncaught ReferenceError: System is not defined

maurya2711 opened this issue · comments

hey Folks,

I need to make my existing Vue 2 project into single-spa project. I am using Following packages and their version:
* Vue 2.7.13
* system-webpack-interope 2.3.7
* single-spa-vue 2.5.1

here it is my vue config file
image

so when i run this project this gave me this error

image

If System is not defined it has not been loaded. Do you have a script tag in your html like below?

<script src="https://cdn.jsdelivr.net/npm/systemjs/dist/system.js"></script>

I have the same error.

            <script src="https://cdn.jsdelivr.net/npm/systemjs/dist/system.js"></script>
            <script src="https://www.gstatic.com/firebasejs/9.0.1/firebase-app.js"></script>
            <script src="https://www.gstatic.com/firebasejs/9.0.1/firebase-messaging.js"></script>
            <script>SystemJS.import('./js/nofity.js').catch(console.error);</script>

and the error is:

      Uncaught SyntaxError: Unexpected token 'export' (at firebase-app.js:1590:1)
      firebase-messaging.js:1 Uncaught SyntaxError: Cannot use import statement outside a module (at firebase-messaging.js:1:1)
       ReferenceError: SystemJS is not defined at index.php:13:1

What am I doing wrong?

Try to use System.import instead of SystemJS.import

there seem to be some error also in the firebase code that I don't know anything about.