-
Notifications
You must be signed in to change notification settings - Fork 4
Open
Description
After migrating to ES modules, this error happens on docs generation:
> @ubio/organisation-service@0.0.49 docs:openapi
> generate-openapi > openapi.json
file:///Users/anatoliy/projects/ubio/organisation-service/node_modules/@ubio/framework/out/bin/generate-openapi.js:7
require(appModulePath);
^
ReferenceError: require is not defined in ES module scope, you can use import instead
This file is being treated as an ES module because it has a '.js' file extension and '/Users/anatoliy/projects/ubio/organisation-service/node_modules/@ubio/framework/package.json' contains "type": "module". To treat it as a CommonJS script, rename it to use the '.cjs' file extension.
at file:///Users/anatoliy/projects/ubio/organisation-service/node_modules/@ubio/framework/out/bin/generate-openapi.js:7:1
at ModuleJob.run (node:internal/modules/esm/module_job:198:25)
at async Promise.all (index 0)
Steps to reproduce:
- clone organisation-service repo
- install its latest dependencies (npm i)
- run
npm run docs
Observed
Error presented above, no docs generated
Expected
No error, docs generated
Metadata
Metadata
Assignees
Labels
No labels