0.0.3 • Published 2 years ago
vc-npm-resume-bekah-haha v0.0.3
Virtual Coffee npm Resume
A workshop showing making your own npx-runnable npm package. 🎁
We'll cover:
- (topic: node/npm) How to set up a very straightforward npm package (just a single .js file)
- (topic: core JS) Logging some things in the file
- (topic: node/npm) Adding a dependency on chalk to get nice colors
- (topic: core JS) Wrapping those logs with | etc. characters to make a table
- (delighter) Using arbitrary math to make a gradient with chalk
https://www.npmjs.com/package/vc-npm-resume
Steps we took
- Create an
index.jsfile - Add a
console.logto that file - Add
#!/usr/bin/env nodeto the top - Make an npm account (https://www.npmjs.com/signup)
npm login- Verify with
npm whoami
- Verify with
npm publishnpx vc-npm-resume@latest
Debugging
403 Error in npm publish
You do not have permission to publish "vc-npm-resume". Are you logged in as the correct user?
Change the name in your package.json.
You cannot publish over the previously published versions
Try changing the version in package.json.
Otherwise, try npm login to make sure you're logged in.
npm ERR! could not determine executable to run
Add a bin entry in package.json.
And don't feel to bad about it, I totally forgot during the workshop 😉.
0.0.3
2 years ago