Skip to content

Default images can't be rendered: "The "path" argument must be of type string. Received type number (58)" #6774

Description

@jakehemmerle

Have you read the Contributing Guidelines on issues?

Prerequisites

  • I'm using the latest version of Docusaurus.
  • I have tried the npm run clear or yarn clear command.
  • I have tried rm -rf node_modules yarn.lock package-lock.json and re-installing packages.
  • I have tried creating a repro with https://new.docusaurus.io.
  • I have read the console error message carefully (if applicable).

Description

Tutorial images will not load in default initialization. Same w some icons. Those files that "can't be read" do exist and render fine when opened with an image viewer.

I have manually patched the default initialization with this PR, but I don't think they're related.

Reproducible demo

https://github.com/astarnetwork/docs

Steps to reproduce

yarn create docusaurus docs classic --typescript or
yarn create docusaurus docs classic

then start it

yarn start

i suspect this still happens using npm or other package managers

Expected behavior

Shouldn't see errors in the console, images should appear on the site.

Actual behavior

✔ Client
  Compiled successfully in 11.24s

[ERROR] The image at /Users/jake/codebases/astar/test/blog/2021-08-26-welcome/docusaurus-plushie-banner.jpeg can't be read correctly. Please ensure it's a valid image.
The "path" argument must be of type string. Received type number (58)
[ERROR] The image at /Users/jake/codebases/astar/test/blog/2021-08-26-welcome/docusaurus-plushie-banner.jpeg can't be read correctly. Please ensure it's a valid image.
The "path" argument must be of type string. Received type number (130)
[ERROR] The image at /Users/jake/codebases/astar/test/static/img/tutorial/localeDropdown.png can't be read correctly. Please ensure it's a valid image.
The "path" argument must be of type string. Received type number (131)
[ERROR] The image at /Users/jake/codebases/astar/test/static/img/docusaurus.png can't be read correctly. Please ensure it's a valid image.
The "path" argument must be of type string. Received type number (132)
[ERROR] The image at /Users/jake/codebases/astar/test/static/img/tutorial/docsVersionDropdown.png can't be read correctly. Please ensure it's a valid image.
The "path" argument must be of type string. Received type number (133)
client (webpack 5.69.1) compiled successfully

✔ Client
  Compiled successfully in 169.78ms

Your environment

  • Public source code: https://github.com/astarnetwork/docs
  • Public site URL:
  • Docusaurus version used: latest beta
  • Environment name and version (e.g. Chrome 89, Node.js 16.4): yarn 3.2.0; node 16.14.0
  • Operating system and version (e.g. Ubuntu 20.04.2 LTS): macos 12.1

Self-service

  • I'd be willing to fix this bug myself.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugAn error in the Docusaurus core causing instability or issues with its executionexternalThis issue is caused by an external dependency and not Docusaurus.

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions