简体   繁体   中英

How to run cli command from package without global install using npx

I'm trying to run a cli command from @foal/cli using npx to avoid global installation.

Following the docs I should do the following:

$ npm install -g @foal/cli

$ foal createapp my-app

I'm trying to use npx to avoid global installation of package.

Following this article I tried the following:

$ npx -package @foal/cli foal createapp foal-test
npx: installed 203 in 27.122s
'foal' is not recognized as an internal or external command,
operable program or batch file.

Any idea how to achieve this?

它应该是npx --packagenpx --package npx -p简称。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM