swagger-ui-plugins
swagger-ui-plugins copied to clipboard
TypeError in Node 20
I am encountering an error when attempting to require
, import
, or await import
this module, using Node.js 20. The error happens in both ESM and CJS mode. It can be replicated in the Node.js REPL:
$ node
Welcome to Node.js v20.11.0.
Type ".help" for more information.
> var HierarchicalTagsPlugin = require('swagger-ui-plugin-hierarchical-tags')
Uncaught TypeError: Cannot assign to read only property 'exports' of object '#<Object>'
at /.../node_modules/swagger-ui-plugin-hierarchical-tags/build/index.js:6:15003
at Module.<anonymous> (/.../node_modules/swagger-ui-plugin-hierarchical-tags/build/index.js:6:15280)
at Module.<anonymous> (/.../node_modules/swagger-ui-plugin-hierarchical-tags/build/index.js:6:15408)
at r (/.../node_modules/swagger-ui-plugin-hierarchical-tags/build/index.js:1:110)
at /.../node_modules/swagger-ui-plugin-hierarchical-tags/build/index.js:1:902
Same here, Node 20.x.x or Node 18.x.x, the folder @kael-shipman/swagger-ui-plugin-hierarchical-tags doesn't exist anymore.. I don't know if it's related to the problem.