swagger-api / swagger-api/swagger-ui
Missing dependency isArray
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 29k
- Forks
- 9.3k
- Avg merge
- 2d 23h
- Merged PRs (30d)
- 25
Description
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",
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with package.json and the generated node_modules/swagger-ui/dist/swagger-ui.js referenced in the build error. Reproduce the npm-installed swagger-ui@3.21.0 build with Parcel, then verify that the package builds without the unresolved dependency error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- build-system
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 35/100