PaloAltoNetworks / PaloAltoNetworks/docusaurus-openapi-docs
Wrong ProvidePlugin of URL
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 1.1k
- Forks
- 315
- Avg merge
- 7d 5h
- Merged PRs (30d)
- 7
Description
Describe the bug
The PR #1089 introduced ProvidePlugin for 'URL' from 'url', but URL is not included in node url module.
This causes a browser error of Q is not a constructor if any client code includes new URL(...)
Expected behavior
No error with client code new URL(...)
Current behavior
Error in browser
Possible solution
Remove the fallback settings of 'URL'.
Steps to reproduce
Edit: this is not reproducible any more, since they downgraded this plugin to an older version to workaround the issue.
- Open https://docs.port.io/
- Click the search bar at top-right
- An error reported in browser console.
Screenshots
Context
Your Environment
- Version used: 4.3.5
- Environment name and version (e.g. Chrome 59, node.js 5.4, python 3.7.3):
- Operating System and version (desktop or mobile):
- Link to your project: https://github.com/port-labs/port-docs
Related issue: https://github.com/easyops-cn/docusaurus-search-local/issues/500
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
Review PR #1089 and the current ProvidePlugin configuration for the URL fallback, including the older plugin version used as a workaround. Verify the behavior with client code using new URL(...) and confirm that the browser error is gone when the incorrect fallback is removed.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- node.js, typescript, webpack
- Domain
- build-system, frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100