Thursday 19 December 2019

How to run and deploy a cli with package json.

This is my first node cli and first npm publish. Not sure what went wrong.I am using windows git bash.When I run it as node index.js. it works as expected with colors. here is the result .package.json"author": "rakesh shrestha","license": "ISC","dependencies": { "chalk": "^3.0.0", "ejs": "^3.0.1", "figlet": "^1.2.4", "inquirer": "^7.0.1", "inquirer-fuzzy-path": "^2.2.0" },"bin": {"intelligent-wizard": "./index.js"}But when I run the cli with package bin intelligent-wizard it doesn't work the same, colors aren't displayed.using the bin command intelligent-wizard it shows likeAnd Whenever I download this package on a new computer I need to do npm-linkhow can i avoid it?here is my package, its small. https://www.npmjs.com/package/intelligent-wizard.

Submitted December 20, 2019 at 04:12AM by rakeshShrestha

No comments:

Post a Comment