Skip to content

TypeError: s.replace is not a function #358

@NorseGaud

Description

@NorseGaud
❯ npx openapi-qraft --plugin tanstack-query-react --plugin openapi-typescript ../../../pkg/api/openapi3.yaml --output-dir app/api
ℹ ✨ OpenAPI Qraft 2.11.0
✖ Error occurred during api service generation
/Users/nathanpierce/woolyai/controller/internal/controller/web/node_modules/typescript/lib/typescript.js:20032
  return s.replace(escapedCharsRegExp, getReplacement);
           ^

TypeError: s.replace is not a function
    at escapeString (/Users/nathanpierce/woolyai/controller/internal/controller/web/node_modules/typescript/lib/typescript.js:20032:12)
    at escapeNonAsciiString (/Users/nathanpierce/woolyai/controller/internal/controller/web/node_modules/typescript/lib/typescript.js:20036:7)
    at getLiteralText (/Users/nathanpierce/woolyai/controller/internal/controller/web/node_modules/typescript/lib/typescript.js:17232:22)
    at getLiteralTextOfNode (/Users/nathanpierce/woolyai/controller/internal/controller/web/node_modules/typescript/lib/typescript.js:123698:12)
    at emitLiteral (/Users/nathanpierce/woolyai/controller/internal/controller/web/node_modules/typescript/lib/typescript.js:120984:18)
    at pipelineEmitWithHintWorker (/Users/nathanpierce/woolyai/controller/internal/controller/web/node_modules/typescript/lib/typescript.js:120823:18)
    at pipelineEmitWithHint (/Users/nathanpierce/woolyai/controller/internal/controller/web/node_modules/typescript/lib/typescript.js:120447:7)
    at pipelineEmitWithComments (/Users/nathanpierce/woolyai/controller/internal/controller/web/node_modules/typescript/lib/typescript.js:124204:5)
    at pipelineEmit (/Users/nathanpierce/woolyai/controller/internal/controller/web/node_modules/typescript/lib/typescript.js:120392:5)
    at emitExpression (/Users/nathanpierce/woolyai/controller/internal/controller/web/node_modules/typescript/lib/typescript.js:120376:5)

Node.js v22.14.0
{
  "name": "dashboard",
  "version": "0.0.1",
  "private": true,
  "scripts": {
    "dev": "next dev --turbopack",
    "build": "next build",
    "start": "next start",
    "lint": "next lint"
  },
  "dependencies": {
    "@headlessui/react": "^2.2.6",
    "@heroicons/react": "^2.2.0",
    "@openapi-qraft/react": "^2.11.0",
    "@tanstack/react-query": "^5.83.0",
    "next": "15.4.2",
    "react": "19.1.0",
    "react-dom": "19.1.0"
  },
  "devDependencies": {
    "@eslint/eslintrc": "^3",
    "@openapi-qraft/cli": "^2.11.0",
    "@tailwindcss/postcss": "^4",
    "@types/node": "^20",
    "@types/react": "^19",
    "@types/react-dom": "^19",
    "eslint": "^9",
    "eslint-config-next": "15.4.2",
    "tailwindcss": "^4",
    "typescript": "^5"
  }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions