Skip to content
This repository was archived by the owner on Jan 24, 2025. It is now read-only.
This repository was archived by the owner on Jan 24, 2025. It is now read-only.

Build breaks with repository field in package.json #1635

@inlet

Description

@inlet

I'm using Docz for react-pixi, but it seems that the build breaks when having set the repository field in the app's package.json.

I get the following error:

TypeError: repo.browsetemplate.replace is not a function

  - index.js:745 getRepoUrl
    [react-pixi]/[docz-core]/dist/index.js:745:62

  - index.js:783 getInitialConfig
    [react-pixi]/[docz-core]/dist/index.js:783:19

  - index.js:817 Object.state [as config]
    [react-pixi]/[docz-core]/dist/index.js:817:19

  - sourceNodes.js:23 Object.module.exports
    [react-pixi]/[gatsby-theme-docz]/lib/sourceNodes.js:23:12

  - runMicrotasks

  - task_queues:96 processTicksAndRejections
    node:internal/process/task_queues:96:5

  - api-runner-node.js:485 runAPI
    [react-pixi]/[gatsby]/src/utils/api-runner-node.js:485:16

To Reproduce

  1. Create a project: npm init and fill in a reposity (I.e https://github.com/inlet/react-pixi.git)
  2. Install docz: npm install docz react react-dom
  3. Create a test doc: echo "# Test" > test.mdx
  4. Run build npx docz dev

Expected behavior

Pass the build

Environment

  • docz version: 2.3.1
  • OS: OSX 11.4 MacBook Air (M1, 2020)
  • Node/npm version: Node 16.1.0 / Npm 7.11.2

Metadata

Metadata

Assignees

No one assigned

    Labels

    priority: highHigh priority issuesupstreamIssue originates from dependency

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions