Why doesn't npx work with @vue/cli?
neverendingqs opened this issue · comments
I was able to find a comment on a related issue that suggests this should work: #112 (comment)
The following commands
$ npx @vue/cli
$ mono
$ mono-sgen
result in the same output:
Usage is: mono [options] program [program-options]
Development:
--aot[=<options>] Compiles the assembly to native code
--debug[=<options>] Enable debugging support, use --help-debug for details
--debugger-agent=options Enable the debugger agent
--profile[=profiler] Runs in profiling mode with the specified profiler module
--trace[=EXPR] Enable tracing, use --help-trace for details
--jitmap Output a jit method map to /tmp/perf-PID.map
--help-devel Shows more options available to developers
Runtime:
--config FILE Loads FILE as the Mono config
--verbose, -v Increases the verbosity level
--help, -h Show usage information
--version, -V Show version information
--runtime=VERSION Use the VERSION runtime, instead of autodetecting
--optimize=OPT Turns on or off a specific optimization
Use --list-opt to get a list of optimizations
--security[=mode] Turns on the unsupported security manager (off by default)
mode is one of cas, core-clr, verifiable or validil
--attach=OPTIONS Pass OPTIONS to the attach agent in the runtime.
Currently the only supported option is 'disable'.
--llvm, --nollvm Controls whenever the runtime uses LLVM to compile code.
--gc=[sgen,boehm] Select SGen or Boehm GC (runs mono or mono-sgen)
However, I am able to run the CLI when I install it globally:
$ npm install -g @vue/cli
$ vue
Usage: vue <command> [options]
Options:
-V, --version output the version number
-h, --help output usage information
Commands:
create [options] <app-name> create a new project powered by vue-cli-service
...
Interestingly enough, the following runs as expected:
$ npx create-react-app
npx: installed 91 in 3.993s
Please specify the project directory:
create-react-app <project-directory>
For example:
create-react-app my-react-app
Run create-react-app --help to see all options.
Using -p
also works as expected:
$ npx -p @vue/cli vue
Usage: vue <command> [options]
Options:
-V, --version output the version number
-h, --help output usage information
Commands:
create [options] <app-name> create a new project powered by vue-cli-service
...
but it re-installs the package each time (probably because of #214).
System:
$ nvm --version
0.34.0
$ npm --version
6.4.1
$ node --version
v10.15.1
$ cat /etc/os-release
NAME="Linux Mint"
VERSION="18.3 (Sylvia)"
ID=linuxmint
ID_LIKE=ubuntu
PRETTY_NAME="Linux Mint 18.3"
VERSION_ID="18.3"
HOME_URL="http://www.linuxmint.com/"
SUPPORT_URL="http://forums.linuxmint.com/"
BUG_REPORT_URL="http://bugs.launchpad.net/linuxmint/"
VERSION_CODENAME=sylvia
UBUNTU_CODENAME=xenial