Some Tutorial Instructions Not working (Package Scoping and some other): Distribute
See original GitHub issueLocation: https://www.learnstorybook.com/design-systems-for-developers/react/en/distribute/
Publishing the project to npm will not work (as others have published the same project e.g. while doing this tutorial)
One has to use scoping: https://docs.npmjs.com/about-scopes https://docs.npmjs.com/creating-and-publishing-scoped-public-packages
Package Meta Data:
Had to change “yarn init” to
yarn init --scope=@npmusername
Publish:
Had to use the yarn version of “npm publish” with public access (otherwise I would get errors):
yarn publish --access=public
Release:
“yarn release” did not work. Gave ENEEDAUTH error (not authorized) although “yarn auto release” works fine. Had to use:
npm run release
Add package to app:
This did not work “yarn add <your-username>-learnstorybook-design-system” (I did add my npm username). This worked:
yarn add @npmusername/learnstorybook-design-system
Note: sometimes the yarn command works sometimes the npm command works (e.g. in Publish and Release above). Not sure if this something wrong I did from my side. I have been following the tutorial as is.
I hope this is helpful!
Issue Analytics
- State:
- Created 3 years ago
- Comments:7 (3 by maintainers)
Top GitHub Comments
@TamaraPK if you don’t mind close the issue in here and open an issue in the LearnStorybook repo. That’s the appropriate repo for issues regarding the tutorial. I haven’t had the time to look into the other issues in finer detail that you’ve created there regarding said tutorial. But it’s on my todo list.
@MickL if you don’t mind compile a list of items you have with the Angular documentation for Storybook and leave a comment in the following issue #13499 as its the placeholder for the documentation restructure that i’m going to embark soon. For issues with the tutorial the same suggestion, create an issue in the tutorial’s repo detailing your struggle and issues so that it can be looked at and fix the tutorial where it needs to be fixed.
Sounds good both of you?
Stay safe
No need to thank @TamaraPK i’m the one that should thank you for raising these issues. Really glad that you’re loving it 😃. Once again don’t hesitate to let me know if any other issues you encounter.
Stay safe