README published by yarn 2 is not correctly shown on verdaccio
See original GitHub issue⚠️⚠️⚠️⚠️ Workaround available, scroll down ⬇️ ⚠️⚠️⚠️⚠️
Describe the bug
README is not correctly shown on verdaccio using yarn npm publish
To Reproduce
mkdir yarn-verdaccio-readme
cd yarn-verdaccio-readme
yarn set version berry
echo '
npmPublishRegistry: http://localhost:4873
unsafeHttpWhitelist: [localhost]
' >> .yarnrc.yml
echo '
{
"name": "yarn-verdaccio-readme",
"version": "0.1.0"
}
' > package.json
echo '# yarn-verdaccio-readme' > README.md
yarn
docker run --rm -p 4873:4873 -d verdaccio/verdaccio:4.8.1
echo 'input some random username/password'
yarn npm login --publish
yarn npm publish
yarn npm logout --publish
echo 'open http://localhost:4873/-/web/detail/yarn-verdaccio-readme then you will see "ERROR: No README data found!".'
Expected behavior
README should be correctly shown on verdaccio
Screenshots
$ yarn npm publish
➤ YN0000: README.md
➤ YN0000: package.json
➤ YN0000: Package archive published
➤ YN0000: Done in 0.91s
Configuration File (cat ~/.config/verdaccio/config.yaml)
Default config in the verdaccio/verdaccio:4.8.1
docker image
Environment information
Server: the verdaccio/verdaccio:4.8.1
docker image
Client: Yarn 2.1.1
Additional context
README.md
is correctly uploaded- the issue seems to be that
verdaccio
depends on thereadme
field in the publish body to show the README content - the yarn 2 client does not provide the
readme
field in the publish body whilenpm
did provide it, but the NPM registry seems to work fine without that field, for example the yarn 2 published@yarnpkg/libzip
package shows the README correctly. - the corresponding yarn 2 issue: https://github.com/yarnpkg/berry/issues/1702
Issue Analytics
- State:
- Created 3 years ago
- Reactions:7
- Comments:16 (9 by maintainers)
Top Results From Across the Web
@verdaccio/readme | Yarn - Package Manager
Fast, reliable, and secure dependency management.
Read more >yarn | Verdaccio
yarn @1.x by default does not send the token on every request unless is ... yarn npm publish does not send README, read...
Read more >Verdaccio - publish without being logged in? - Stack Overflow
But in a nutshell, npm@7 requires a token to publish, thus, is just a matter of fake a token to bypass npm. Verdaccio...
Read more >How to test publishing your JavaScript package locally
Also, I'd like to see a kind of "preview" of how it'll look like when it's published, the "real" npm page, just to...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Still actual for Verdaccio v5.6.2 and Yarn v3.2.0 😕
As a temporary workaround, I ended up manually adding the readme field with the contents of the
README.md
. It’s suitable for the CI environment, but you can do a cleanup in thepostpack
script if you need to. It’s dirty enough, hope this issue will be resolved someday.package.json
scripts/prepack.js
I’ll ship it in the next minor release over the weekend 👍