Skip to content

Bug: npm run generate invalid token  #1642

@leecjaster

Description

@leecjaster

Several of the listed fixes did not work for me here on a similar issue: #576

Environment

  • @faustwp/core version: 0.2.2
  • @faustwp/cli version: 0.2.13
  • @faustwp/blocks version: N/A
  • @faustwp/block-editor-utils version: N/A
  • WordPress version: 6.3.2
  • Browser, OS, and other relevant software versions: N/A

Description

When running npm run generate locally, I receive the following error below. The URL of https://hdhypz129th2qx4j654qqmbh2.js.wpenginepowered.com/graphql is the front-end Atlas staging URL from Wordpress Engine. Is that the correct URL it should be looking at for the graphQL endpoint and updating ACF custom fields in possibleTypes.json ?

> @faustjs/[email protected] generate
> faust generatePossibleTypes


/Users/lee/sites/REDACTED/node_modules/node-fetch/lib/index.js:273
                                return Body.Promise.reject(new FetchError(`invalid json response body at ${_this2.url} reason: ${err.message}`, 'invalid-json'));
                                                           ^
FetchError: invalid json response body at https://hdhypz129th2qx4j654qqmbh2.js.wpenginepowered.com/graphql reason: Unexpected token < in JSON at position 0
    at /Users/lee/sites/REDACTED/node_modules/node-fetch/lib/index.js:273:32
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at async generatePossibleTypes (file:///Users/lee/sites/REDACTED/node_modules/@faustwp/cli/dist/utils/generatePossibleTypes.js:29:18)
    at async file:///Users/lee/sites/REDACTED/node_modules/@faustwp/cli/dist/index.js:52:13 {
  type: 'invalid-json'

Expected vs. Actual Behavior

I anticipate the graphQl endpoint to update the possibleTypes.json file.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    ✅ Closed

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions