Skip to content
Nick edited this page Sep 13, 2022 · 4 revisions

When I install the NPM version of the Token Negotiator inside my current project, I am seeing build errors where there are missing packages.

Details and a solution to this issue

The Token Negotiator uses modern browser features that are not always supported by older browsers. To use the NPM version of the library, you may need to include a supported browser list inside your web apps package.json (as shown below) or include a polyfils using a tool such a Browserify in your development pipeline.

  "browserslist": {
    "production": [
      ">0.2%",
      "not dead",
      "not op_mini all"
    ],
    "development": [
      "last 1 chrome version",
      "last 1 firefox version",
      "last 1 safari version"
    ]
  },

Alternatively the Browser build (shown below) can be used, which out of the box includes polfils to support older browsers.

Browser build

  <script type="text/javascript" src="./token-negotiator-dist/negotiator.js"></script>
  <link rel="stylesheet" href="./token-negotiator-dist/theme/style.css" />
Clone this wiki locally