Skip to content

Missing dependency isArray #5254

@adjenks

Description

@adjenks

Q&A (please complete the following information)

  • OS: linux
  • Browser: any
  • Version: swagger-ui@3.21.0
  • Method of installation: npm
  • Swagger-UI version: swagger-ui@3.21.0
  • Swagger/OpenAPI version: n/a

Content & configuration

Example Swagger/OpenAPI definition:

n/a

Swagger-UI configuration options:

import SwaggerUI from 'swagger-ui'
import 'swagger-ui/dist/swagger-ui.css'

const ui = SwaggerUI({
	url: "/openapi.yaml",
	dom_id: '#swagger-ui',
	deepLinking: true,
	presets: [
		SwaggerUI.presets.apis
	],
	plugins: [
	],
	layout: "BaseLayout",
	validatorUrl: null
})

Describe the bug you're encountering

Using parcel to build the script fails with:

node_modules/swagger-ui/dist/swagger-ui.js:8:32318: Cannot resolve dependency 'isArray'

To reproduce...

Build swagger-ui@3.21.0 using Parcel with the above "Swagger-UI configuration options".

Expected behavior

I expect it to build

Screenshots

Additional context or thoughts

I've fixed it on my personal setup by going into the package.json of swagger-ui and adding the dependency:
"isarray": "^2.0.4",

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions