$ bunx kubb -v
π π Loading config
ERROR Dynamic require of "fs" is not supported 3:37:28 PM
at kubb.config.bundled_n90ogx543t.mjs:11:9
at node_modules/@redocly/openapi-core/lib/utils.js (kubb.config.bundled_n90ogx543t.mjs:658:15)
at __require2 (kubb.config.bundled_n90ogx543t.mjs:17:51)
at node_modules/@redocly/openapi-core/lib/index.js (kubb.config.bundled_n90ogx543t.mjs:22245:19)
at __require2 (kubb.config.bundled_n90ogx543t.mjs:17:51)
at kubb.config.bundled_n90ogx543t.mjs:29580:35
at ModuleJob.run (node:internal/modules/esm/module_job:222:25)
at async ModuleLoader.import (node:internal/modules/esm/loader:316:24)
at async extractResult (node_modules/bundle-require/dist/index.js:166:15)
at async run (node_modules/bundle-require/dist/index.js:209:17)
ERROR Dynamic require of "fs" is not supported 3:37:28 PM
$
The error is specific to something about this config file, I'm still trying to narrow down what,
without a config file, it does not complain about the "fs" module, it complains about the lack of config file. a config file based on the above, but with all plugins deleted, runs, but generates no files.
heavily based on the website example, still produces the error. It seems to happen with any one or more plugins listed, with our without configuration.
How often does this bug happen?
Every time
What is the expected behavior?
It should run the same as it does when called from pnpm or npm
Swagger/OpenAPI file?
openapi: 3.1.0
info:
title: Evony TKR API
version: 0.0.0
description: Allow users to obtain information on Generals, General Pairs,
General Conflicts, General SkillBooks, General Specialities, and related
information for Evony TKR
paths:
/generals:
get:
tags:
generals
summary: Get all Generals
responses:
"200":
content:
application/json:
schema:
type: object
title: GetAllGeneralsOk
required:
data
properties:
data:
type: array
items:
$ref: "#/components/schemas/GeneralSummary"
description: OK - Successful request with response body
"204":
$ref: "#/components/responses/NoContent"
"400":
$ref: "#/components/responses/BadRequest"
"500":
$ref: "#/components/responses/InternalServerErrror"
operationId: getAllGenerals
/generals/{name}:
get:
tags:
generals
summary: Get a General by Name
responses:
"200":
content:
application/json:
schema:
type: object
title: GetAGeneralByNameOk
required:
data
properties:
data:
$ref: "#/components/schemas/General"
description: OK - Successful request with response body
"400":
$ref: "#/components/responses/BadRequest"
"404":
$ref: "#/components/responses/NotFound"
"500":
$ref: "#/components/responses/InternalServerErrror"
parameters:
in: query
name: level
style: form
schema:
type: integer
explode: true
required: false
description: set the level of the general you want information about
allowReserved: false
description: "Returns the general with the matching name. "
operationId: getAGeneralByName
components:
schemas:
Buff:
type: object
required:
levels
properties:
levels:
type: array
items:
$ref: "#/components/schemas/AscendingLevel"
activeLevel:
$ref: "#/components/schemas/AscendingLevelNames"
description: The overall effeects of Ascending a General
Condition:
oneOf:
anyOf:
$ref: "#/components/schemas/BuffCondition"
$ref: "#/components/schemas/DebuffConditions"
type: array
items:
anyOf:
$ref: "#/components/schemas/BuffCondition"
$ref: "#/components/schemas/DebuffConditions"
description: "A condition is essentially an adverb for a Buff object. "
Speciality:
type: object
required:
buffs
properties:
name:
type: string
buffs:
type: array
items:
$ref: "#/components/schemas/Buff"
level:
type: integer
format: int32
maximum: 4
minimum: 1
description: Standard Books that can be added to a General
BuffCondition:
enum:
Against_Monsters
Attacking
Defending
During_SvS
In_City
In_Main_City
Marching
Reinforcing
When_City_Mayor
When_City_Mayor_for_This_SubCity
When_Defending_Outside_the_Main_City
When_Rallying
When_the_Main_Defense_General
When_an_Officer
Brings_a_Dragon
Brings_a_Dragon_to_the_Attack
Brings_a_Dragon_or_Spirital_Beast
Brings_a_Dragon_or_Spritial_Beast_to_the_Attack
Leading_the_Army_to_Attack
type: string
description: Some Buffs apply only conditionally
AscendingLevel:
type: object
required:
type: boolean
description: The effect of one star of ascending
BuffAttributes:
oneOf:
enum:
Attack
Attack_Speed
Death_to_Survival
Death_to_Soul
Death_to_Wounded
Defense
Deserter_Capacity
Double_Items_Drop_Rate
HP
Healing_Speed
Hospital_Capacity
Leadership
Load
March_Size_Capacity
March_Time
Marching_Speed
Marching_Speed_to_Monsters
Politics
Rally_Capacity
Range
Resources_Production
Stamina_Cost
SubCity_Construction_Speed
SubCity_Gold_Production
SubCity_Training_Speed
SubCity_Troop_Capacity
Training_Capacity
Training_Speed
Wounded_to_Death
type: string
description: The many possible attributes that can be buffed
description: ""
GeneralSummary:
type: object
properties:
name:
type: string
type:
type: string
description: The minimal information necessary to find a General
x-fiddle-dto-info:
baseSchemaName: General
BasicAttributes:
type: object
required:
type: boolean
description: ""
AscendingSummary:
type: object
properties:
levels:
type: array
items:
type: string
ascendingLevelNamesId:
type: string
description: >
A simplified representation of a Ascending, typically used in list
views.
x-fiddle-dto-info:
baseSchemaName: Ascending
DebuffConditions:
enum:
Enemy
Enemy_in_City
Reduces_Enemy
Reduces_Enemy_in_Attack
Reduces_Enemy_with_a_Dragon
Reduces_Enemy_with_a_Dragon_or_Spiritual_Beast
Reduces
type: string
description: Some Buffs are in fact Debuffs
SpecialityEffect:
type: object
required:
$ref: "#/components/schemas/SpecialityLevelNames"
description: |
The Effective Buff Provided by a Speciality at a particular level
x-fiddle-dto-info:
baseSchemaName: Speciality
AscendingLevelNames:
oneOf:
$ref: "#/components/schemas/PurpleGeneralAscendingLevels"
description: >
A general Ascends as either a Red or a Purple General but not both.
SpecialityLevelNames:
enum:
5Red
type: string
default: None
description: AscendingLevels for Red Generals
BasicAttributesObjectSummary:
type: object
properties:
Base:
type: number
Total:
type: number
Increment:
type: number
description:
A simplified representation of a BasicAttributesObject, typically
used in list views.
x-fiddle-dto-info:
baseSchemaName: BasicAttributesObject
PurpleGeneralAscendingLevels:
enum:
message
properties:
message:
type: string
description:
The server cannot find the requested resource. The endpoint may be
invalid or the resource may no longer exist.
NoContent:
content:
application/json:
schema:
type: "null"
description:
The request was successful, but there is no content to return in
the response.
BadRequest:
content:
application/json:
schema:
type: object
required:
message
properties:
message:
type: string
message:
type: string
description:
The server could not understand the request due to invalid syntax.
The client should modify the request and try again.
InternalServerErrror:
content:
application/json:
schema:
type: object
required:
message
properties:
message:
type: string
description:
The server encountered an unexpected condition that prevented it
from fulfilling the request. Report the issue to the support team if it
persists.
parameters:
name:
in: path
name: name
schema:
type: string
required: true
tags:
name: generals
Additional information
actually I'm not sure how bun related this is?
$ npx kubb --config kubb.config.ts
π π Loading config
ERROR Dynamic require of "fs" is not supported 3:48:24 PM
at kubb.config.bundled_umdq3kn3w6q.mjs:11:9
at node_modules/@redocly/openapi-core/lib/utils.js (kubb.config.bundled_umdq3kn3w6q.mjs:143:15)
at __require2 (kubb.config.bundled_umdq3kn3w6q.mjs:14:51)
at node_modules/@redocly/openapi-core/lib/index.js (kubb.config.bundled_umdq3kn3w6q.mjs:21730:19)
at __require2 (kubb.config.bundled_umdq3kn3w6q.mjs:14:51)
at kubb.config.bundled_umdq3kn3w6q.mjs:27732:35
at ModuleJob.run (node:internal/modules/esm/module_job:222:25)
at async ModuleLoader.import (node:internal/modules/esm/loader:316:24)
at async extractResult (node_modules/bundle-require/dist/index.js:166:15)
at async run (node_modules/bundle-require/dist/index.js:209:17)
ERROR Dynamic require of "fs" is not supported 3:48:24 PM
$ npx --version
10.7.0
$ node --version
v20.15.0
$
What version of
kubb
is running?2.28.3
What platform is your computer?
MacOS
What version of external packages are you using(
@tanstack-query
,MSW
,React
,Vue
, ...)"devDependencies": { "@commitlint/cli": "^19.5.0", "@commitlint/config-conventional": "^19.5.0", "@commitlint/types": "^19.5.0", "@eslint/js": "^9.13.0", "@kubb/cli": "^2.28.3", "@kubb/core": "^2.28.3", "@kubb/parser-ts": "^2.28.3", "@kubb/plugin-oas": "^2.28.3", "@kubb/swagger": "^2.28.3", "@kubb/swagger-ts": "^2.28.3", "@kubb/swagger-zod": "^2.28.3", "@release-it/conventional-changelog": "^8.0.2", "@tailwindcss/typography": "^0.5.15", "@types/bun": "^1.1.11", "@types/eslint__js": "^8.42.3", "@types/node": "^22.7.8", "@types/postcss-import": "^14.0.3", "@typescript-eslint/parser": "^8.11.0", "ajv": "^8.17.1", "autoprefixer": "^10.4.20", "eslint": "^9.13.0", "eslint-config-prettier": "^9.1.0", "eslint-plugin-prettier": "^5.2.1", "husky": "^9.1.6", "orval": "^7.2.0", "postcss": "^8.4.47", "postcss-import": "^16.1.0", "postcss-load-config": "^6.0.1", "postcss-nested": "^6.2.0", "postcss-plugin": "^1.0.0", "rollup-plugin-postcss-lit": "^2.1.0", "tailwindcss": "^3.4.14", "ts-lit-plugin": "^2.0.2", "typescript": "^5.6.3" }, "dependencies": { "@gracile/gracile": "^0.7.1", "@gracile/svg": "^0.1.0", "@hono/arktype-validator": "^2.0.0", "@hono/node-server": "^1.13.2", "@readme/openapi-parser": "^2.6.0", "@spectrum-css/icon": "^7.1.4", "@spectrum-css/page": "^8.1.3", "@spectrum-css/tokens": "^14.5.0", "@spectrum-css/typography": "^6.1.3", "arktype": "^2.0.0-rc.17", "hono": "^4.6.5", "jiti": "^1.21.6", "lint-staged": "^15.2.10", "lit": "^3.2.1", "postcss-lit": "^1.1.1", "prettier": "^3.3.3", "release-it": "^17.10.0", "tsx": "^4.19.1", "typescript-eslint": "^8.11.0", "vite": "^5.4.9" },
What steps can reproduce the bug?
The error is specific to something about this config file, I'm still trying to narrow down what,
without a config file, it does not complain about the "fs" module, it complains about the lack of config file. a config file based on the above, but with all plugins deleted, runs, but generates no files.
heavily based on the website example, still produces the error. It seems to happen with any one or more plugins listed, with our without configuration.
How often does this bug happen?
Every time
What is the expected behavior?
It should run the same as it does when called from pnpm or npm
Swagger/OpenAPI file?
openapi: 3.1.0 info: title: Evony TKR API version: 0.0.0 description: Allow users to obtain information on Generals, General Pairs, General Conflicts, General SkillBooks, General Specialities, and related information for Evony TKR paths: /generals: get: tags:
Additional information
actually I'm not sure how bun related this is?