You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
Encountering a TypeError when trying to use the swagger-jsdoc library in a project where lint-staged is also installed. The error occurs during the execution of the project, specifically when building the Swagger specification files. The error does not appear when lint-staged is uninstalled.
This is the error that i see:
/home/aruberuto/projects/comuncity/code/swagger-jsdoc-lint-staged/node_modules/swagger-jsdoc/src/specification.js:187
YAML.defaultOptions.keepCstNodes = true;
^
TypeError: Cannot set properties of undefined (setting 'keepCstNodes')
at build (/home/aruberuto/projects/comuncity/code/swagger-jsdoc-lint-staged/node_modules/swagger-jsdoc/src/specification.js:187:36)
at module.exports (/home/aruberuto/projects/comuncity/code/swagger-jsdoc-lint-staged/node_modules/swagger-jsdoc/src/lib.js:32:10)
at Object.<anonymous> (/home/aruberuto/projects/comuncity/code/swagger-jsdoc-lint-staged/src/index.ts:14:26)
You should see the log in the terminal with the generated documentation in json.
Expected behavior
The project should start without errors when using the lint-staged library, and the Swagger documentation should be built successfully.
Desktop:
OS: Pop!_OS 22.04 LTS
Node version: v20.9.0
npm version: 10.2.24
The text was updated successfully, but these errors were encountered:
Describe the bug
Encountering a TypeError when trying to use the
swagger-jsdoc
library in a project wherelint-staged
is also installed. The error occurs during the execution of the project, specifically when building the Swagger specification files. The error does not appear whenlint-staged
is uninstalled.This is the error that i see:
To Reproduce the error with lint-staged
npm install
.npm start
.No error after removing lint-staged
npm install
.npm remove lint-staged
npm start
.Expected behavior
The project should start without errors when using the lint-staged library, and the Swagger documentation should be built successfully.
Desktop:
v20.9.0
10.2.24
The text was updated successfully, but these errors were encountered: