Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Uncaught ReferenceError: System is not defined #2440

Open
maurya2711 opened this issue Oct 22, 2022 · 3 comments
Open

Uncaught ReferenceError: System is not defined #2440

maurya2711 opened this issue Oct 22, 2022 · 3 comments

Comments

@maurya2711
Copy link

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

@nilzona
Copy link
Contributor

nilzona commented Oct 25, 2022

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>

@pierrybos
Copy link

pierrybos commented May 10, 2023

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?

@nilzona
Copy link
Contributor

nilzona commented May 12, 2023

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants