Build fails with "Cannot read property 'opId' of undefined"
See original GitHub issueQ&A (please complete the following information)
- OS: ubuntu
- Browser: chrome
- Version: 83.0.4103.97
- Method of installation: npm
- Swagger-UI version: 3.26.2
- Swagger/OpenAPI version: Swagger 2.0, OpenAPI 3.0
Content & configuration
Describe the bug you’re encountering
Our UI builds suddenly stopped working today, failing at the start of karma tests with the error:
HeadlessChrome 83.0.4103 (Linux 0.0.0) ERROR
Uncaught TypeError: Cannot read property 'opId' of undefined
at webpack:///home/jamie/piper/api-builder/node_modules/swagger-ui/dist/swagger-ui.js:8:0 <- test/loadtests.js:269997
I noticed that swagger-ui hadn’t changed in a few days, however, swagger-client changed only 7 hours ago. I also noticed this change: https://github.com/swagger-api/swagger-ui/commit/e3b3bf03d46f7288371cc505a73f7a49b75da1db#diff-c85b6c9e099af384a182e638a811c734R4 from July 6th.
Maybe it is possible that the opId
change to swagger-client was a breaking change?
To reproduce…
Expected behavior
Screenshots
Additional context or thoughts
Issue Analytics
- State:
- Created 3 years ago
- Comments:7 (4 by maintainers)
Top Results From Across the Web
Cannot Read Property of Undefined in JavaScript - Rollbar
TypeError : Cannot read property of undefined occurs when a property is read or a function is called on an undefined variable.
Read more >ng build throws "ERROR in Cannot read property 'kind' of ...
So I found the solution. I had to go in and edit the tsconfig.json. Under "angularCompilerOptions" I had to add "enableIvy": false ....
Read more >How to Prevent the Error: Cannot Read Property '0' of Undefined
A guide on how to prevent the error "cannot Read Property '0' of Undefined", covering techniques such as try, catch, using const over...
Read more >Cannot read property 'error' of undefined - Microsoft Q&A
I opted free Azure subscription and Configured LUIS in bot composer. when I am trying to run code from composer I am getting...
Read more >Error: Cannot read property "attach_url" from undefined
I am using Flow designer to trigger custom API call using an Action to get an output and attach it to the Incident...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
We’ve just released swagger-client@3.10.11 that rectifies the issue. Please rerun your build and the problem should autoresolve. If you already have swagger-client@3.10.10 embeded in your
package-lock.json
oryarn.lock
files please uninstallswagger-ui
and then install it again.Again, thanks for reporting this guys!
swagger-client
fixing PR addressing this issue provided here: https://github.com/swagger-api/swagger-js/pull/1631