Skip to content
This repository was archived by the owner on Jan 27, 2023. It is now read-only.

Uncaught ReferenceError: require is not defined while integrating VSS.SDK.min.js with SystemJS and amd.min.js #157

@nerd-at-hyd

Description

@nerd-at-hyd

I am getting below errors while integrating VSS.SDK.min.js with SystemJS and amd.min.js

Uncaught ReferenceError: require is not defined
    at <anonymous>:1:1
    at w (VSS.SDK.min.js:2)
    at p (VSS.SDK.min.js:2)

below are the scripts, I have included in my index.html

   <script src="https://code.jquery.com/jquery-3.5.1.min.js"></script>
   <script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/umd/popper.min.js" integrity="sha384-9/reFTGAW83EW2RDu2S0VKaIzap3H66lZH81PoYlFhbGU+6BZp6G7niu735Sk7lN" crossorigin="anonymous"></script>

   <link rel="preload" href="https://cdnjs.cloudflare.com/ajax/libs/single-spa/5.5.0/system/single-spa.min.js" as="script" crossorigin="anonymous" />
   <script src='https://unpkg.com/[email protected]/minified.js'></script>
   <script src="https://unpkg.com/[email protected]/dist/zone.js"></script>
   <script src="https://cdnjs.cloudflare.com/ajax/libs/systemjs/6.8.3/system.min.js"></script>
   <script src="https://cdnjs.cloudflare.com/ajax/libs/systemjs/6.8.3/extras/amd.min.js"></script>
   <script src="https://cdnjs.cloudflare.com/ajax/libs/systemjs/4.0.0/extras/named-exports.js"></script>
   <script src="https://cdnjs.cloudflare.com/ajax/libs/systemjs/4.0.0/extras/named-register.min.js"></script>
   <script src="lib/VSS.SDK.min.js"></script>

Here I don't see this error when I remove amd.min.js

code

VSS.init({
          explicitNotifyLoaded: true,
          usePlatformScripts: true
      });
      VSS.ready(function () {
        VSS.require(["VSS/Authentication/Services"], function (VSS_Auth_Service) {
        });
        VSS.notifyLoadSucceeded();
      });

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions