donejs / cli

The DoneJS command line interface
https://www.npmjs.com/package/donejs-cli
MIT License
6 stars 7 forks source link

CLI doesn't work locally installed #127

Open MarcGodard opened 5 years ago

MarcGodard commented 5 years ago

I had many issues with global packages and nvm, so I started installing all packages locally with --save-dev such as donejs and running them using npx however, for some reason donejs is the only package that doesn't work when doing this.

Steps to reproduce:

  1. Don't have donejs installed globally.
  2. Install in a project locally without -g option (can do --save-dev)
  3. run npx donejs this should work.
  4. run npx donejs generate component this will not work. Just freezes.
justinbmeyer commented 5 years ago

DoneJS is designed to ONLY be global. However, it sets up projects with local packages so everything should work without the global donejs command. Instead of using “donejs x”, you should be able to use “npm run donejs x”

justinbmeyer commented 5 years ago

(It might be “npm run donejs-cli x”

MarcGodard commented 5 years ago

@justinbmeyer Ok I will try that and report once I need it again

MarcGodard commented 5 years ago

No on both counts. npx works with almost every other tool. It does run donejs just not when I want to generate a component.

marcgodard@Marcs-MacBook-Pro-3 site-template % npm run donejs generate component 
npm ERR! missing script: donejs

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/marcgodard/.npm/_logs/2019-10-12T23_04_29_256Z-debug.log
marcgodard@Marcs-MacBook-Pro-3 site-template % npm run donejs-cli generate component
npm ERR! missing script: donejs-cli

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/marcgodard/.npm/_logs/2019-10-12T23_04_37_386Z-debug.log
marcgodard@Marcs-MacBook-Pro-3 site-template %