0

I have followed jeroenouw guide and build a node CLI script which looks like the one here. I'm even able to run it locally by running the following commands:

  • npm install
  • npm run build
  • node ./lib/src/index.js

Now I want this CLI to be installed globally and do not know how? I tried npm pack but did not find any solution with it.

Can anybody help me out?

0

1 Answer 1

1

From inside the package folder:

npm link
Sign up to request clarification or add additional context in comments.

2 Comments

If I run npm run build && npm link I get this error 89 error enoent ENOENT: no such file or directory, chmod '/usr/local/lib/node_modules/ts-cli-starter/lib/src/index.ts'
This commit fixed it. You were right it was just missing the right bin path.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.