The test to check whether roc is using local or current CLI always enters the first case (at least on my version of node). require.resolve appends the file suffix (.js), whereas path.resolve does not, so on my computer it compares the paths /absolute/path/to/cli.js and /absolute/path/to/cli, which are never equal.