Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

[Bug]: PnP linker does not work with docusaurus #4086

Closed
1 task
alubbe opened this issue Feb 8, 2022 · 7 comments · Fixed by #3889
Closed
1 task

[Bug]: PnP linker does not work with docusaurus #4086

alubbe opened this issue Feb 8, 2022 · 7 comments · Fixed by #3889
Labels
bug Something isn't working upholded Real issues without formal reproduction

Comments

@alubbe
Copy link
Contributor

alubbe commented Feb 8, 2022

Self-service

  • I'd be willing to implement a fix

Describe the bug

Using the PnP linker with docusaurus (specifically, running yarn build) leads to this error:

[ERROR] The image at yarn2-docusaurus-bug/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 (27)

Setting nodeLinker: node-modules fixes everything.

To reproduce

Clone https://github.com/alubbe/yarn2-docusaurus-bug, run yarn install followed by yarn build to see the errors.

Then set nodeLinker: node-modules (or revert the current commit), run yarn install followed by yarn build to see that it all works again.

This repo was created by simply running npx create-docusaurus@latest my-website classic.

Environment

System:
    OS: macOS 10.15.7
    CPU: (16) x64 Intel(R) Core(TM) i9-9980HK CPU @ 2.40GHz
  Binaries:
    Node: 16.13.2 - /private/var/folders/3q/__zqxvrj0pqdmv03_3hkknl00000gn/T/xfs-c06aa74c/node
    Yarn: 3.1.1 - /private/var/folders/3q/__zqxvrj0pqdmv03_3hkknl00000gn/T/xfs-c06aa74c/yarn
    npm: 8.1.2 - ~/.nvm/versions/node/v16.13.2/bin/npm

Additional context

No response

@alubbe alubbe added the bug Something isn't working label Feb 8, 2022
@alubbe
Copy link
Contributor Author

alubbe commented Mar 2, 2022

Gentle poke here - I know you are all incredibly busy, so I understand you may not have the time to debug this. What commands could I run myself to provide you with logs/info that could help understand how to fix this?

@arcanis
Copy link
Member

arcanis commented Mar 2, 2022

I haven't looked into it yet, but when I saw the error message the first thing that popped into my mind was either something like a Webpack require.resolve being passed to a fs method (the Webpack require.resolve returns module IDs, not paths), or something about file descriptors. But not sure it'd only affect PnP 🤔

@alubbe
Copy link
Contributor Author

alubbe commented Mar 11, 2022

I was thinking along the same lines, but I don't know where to start the debugging journey. Any pointers? Or would it make sense to ask the docusaurus team if they have an idea from just glancing at it?

@merceyz
Copy link
Member

merceyz commented Mar 11, 2022

Will most likely be fixed by #3889

@Josh-Cena
Copy link

Josh-Cena commented Mar 12, 2022

This warning's cause is #3889 (comment), and yes, I did spend a while poking around it last month (didn't see this issue back then)... This warning has been suppressed in Docusaurus as well, in facebook/docusaurus#6779. It's not ideal, so hoping #3889 can land soon :D

@yarnbot

This comment was marked as outdated.

@yarnbot yarnbot added the stale Issues that didn't get attention label Apr 11, 2022
@Josh-Cena
Copy link

It's not not reproducible though :/ Can confirm it's always relevant and I'm really looking forward to removing that check from facebook/docusaurus#6779

@merceyz merceyz added upholded Real issues without formal reproduction and removed stale Issues that didn't get attention labels Apr 11, 2022
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
bug Something isn't working upholded Real issues without formal reproduction
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants