[Bug]: Publishing to verdaccio is very slow #6130
What happened?I work in a monorepo with > 200 packages. When we want to test as though we are using published artefacts, we publish to verdaccio so it's closer to how our users would install our packages. This works fantastically. Unfortunately it takes several minutes running the publish command. Each package taking ~1s or more I've checked it with 6.0.5, 6.9.2, and 7.0.0-next-7.23. I couldn't find any information on v9, so I didn't try that. I've had I'm able to create the verdaccio database directly in a fraction of the time, 11s overall as opposed to the ~2.5min going through verdaccio to build it. Hopefully I've just missed some setting, but if not, I'd like some way to either speed up the verdaccio publish, or, barring that, a CLI tool that can seed the database for me as though I've used the publishing. Version6.x (Stable) Version details6.0.5 Output server log infoHere is some of the output
[@react-types/text]: ➤ YN0000: Publishing to http://localhost:4000 with tag latest
[@react-types/text]: ➤ YN0000: README.md
[@react-types/text]: ➤ YN0000: package.json
[@react-types/text]: ➤ YN0000: src/index.d.ts
[@react-types/text]: ➤ YN0000: Package archive published
[@react-types/text]: ➤ YN0000: Done in 0s 510ms
[@react-types/text]: Process exited (exit code 0), completed in 0s 957ms
[@react-types/view]: ➤ YN0000: Publishing to http://localhost:4000 with tag la****
[@react-types/view]: ➤ YN0000: README.md
[@react-types/view]: ➤ YN0000: package.json
[@react-types/view]: ➤ YN0000: src/index.d.ts
[@react-types/view]: ➤ YN0000: Package archive published
[@react-types/view]: ➤ YN0000: Done in 0s 428ms
[@react-types/view]: Process exited (exit code 0), completed in 0s 731ms
[@react-types/well]: ➤ YN0000: Publishing to http://localhost:4000 with tag la****
[@react-types/well]: ➤ YN0000: README.md
[@react-types/well]: ➤ YN0000: package.json
[@react-types/well]: ➤ YN0000: src/index.d.ts
[@react-types/well]: ➤ YN0000: Package archive published
[@react-types/well]: ➤ YN0000: Done in 0s 453ms
[@react-types/well]: Process exited (exit code 0), completed in 0s 722msNode.js Version24.x.x (LTS) Package manageryarn Operating systemmac Using reverse proxy
Relevant log outputHave I checked other issues?
|
Replies: 3 comments 2 replies
|
Is this your config, @snowystinger ? https://github.com/adobe/react-spectrum/blob/main/scripts/verdaccio-config.yaml |
|
Yes, that's it |
|
From email It looks like the repo is using a default config. Each package needs to be packed, sent to Verdaccio, compared to the npm registry, merged with the manifest from npm, and finally stored. So, in general, the publishing times seem reasonable (using v9 won't change any of this).
The default makes sure that the version you try to publish does not exist in npm already. If you don't care about this, you can remove the proxy (npm uplink) for those packages. For example packages:
'@react-types/*':
access: $all
publish: $all
# add other scoped packages or list them individually
#...
'@*/*':
# scoped packages
access: $all
publish: $all
proxy: npmjs
'**':
access: $all
publish: $all
proxy: npmjsThis should make it faster. |
From email
It looks like the repo is using a default config. Each package needs to be packed, sent to Verdaccio, compared to the npm registry, merged with the manifest from npm, and finally stored. So, in general, the publishing times seem reasonable (using v9 won't change any of this).