commander is outdated
See original GitHub issue🐛 Bug Report
when I install a plugin meta can find the source of the plugin but not the bin.
To Reproduce
- docker container:
docker run -it node:18-bullseye /bin/bash
- install meta globally:
npm install -g meta
- install a plugin globally:
npm install -g meta-search
- set debug:
export DEBUG=*
- run command:
meta search
- result: it will find the lib for meta-search yet not the bin
root@8e6eb90be27e:/# meta search
meta
meta Resolving plugins: +0ms
meta /node_modules +1ms
meta /usr/local/lib/node_modules +283ms
meta + meta-bump +1ms
meta + meta-project +0ms
meta + meta-search +0ms
meta
meta Loading plugins: +0ms
meta + meta-bump /usr/local/lib/node_modules/meta-bump +0ms
meta + meta-project /usr/local/lib/node_modules/meta-project +1ms
meta + meta-search /usr/local/lib/node_modules/meta-search +1ms
meta
meta Loading core plugins: +3ms
meta + meta-git /usr/local/lib/node_modules/meta/node_modules/meta-git +0ms
meta + meta-init /usr/local/lib/node_modules/meta/node_modules/meta-init +1ms
meta + meta-loop /usr/local/lib/node_modules/meta/node_modules/meta-loop +41ms
meta + meta-project (skip) +42ms
find-module-bin looking for meta-search at /node_modules/.bin/meta-search +0ms
find-module-bin looking for meta-search at /usr/local/lib/node_modules/.bin/meta-search +0ms
find-module-bin looking for meta-search at /usr/lib/node_modules/.bin/meta-search +0ms
find-module-bin looking for meta-search at /usr/local/lib/node_modules/meta/bin/node_modules/.bin/meta-search +0ms
find-module-bin looking for meta-search at /usr/local/lib/node_modules/meta/node_modules/.bin/meta-search +0ms
find-module-bin looking for meta-search at /usr/local/node_modules/.bin/meta-search +0ms
find-module-bin looking for meta-search at /usr/node_modules/.bin/meta-search +1ms
Error: could not find meta-search
at findModuleBin (/usr/local/lib/node_modules/meta/node_modules/find-module-bin/lib/index.js:18:9)
at Command.executeSubCommand (/usr/local/lib/node_modules/meta/node_modules/commander/index.js:552:11)
at Command.parse (/usr/local/lib/node_modules/meta/node_modules/commander/index.js:489:17)
at exports.run (/usr/local/lib/node_modules/meta/index.js:47:11)
at Object.<anonymous> (/usr/local/lib/node_modules/meta/bin/meta:8:15)
at Module._compile (node:internal/modules/cjs/loader:1112:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1166:10)
at Module.load (node:internal/modules/cjs/loader:988:32)
at Module._load (node:internal/modules/cjs/loader:834:12)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:77:12)
Expected behavior
- it should find npm-search bin file
- it should print out the usage same as when calling
meta-search
directly
resolve
because find-module-bin does not look for a bin dir within either npm prefix -g
or npm bin -g
the bin file for meta search isn’t found
root@8e6eb90be27e:/# npm prefix -g
/usr/local
root@8e6eb90be27e:/# npm bin -g
/usr/local/bin
root@8e6eb90be27e:/# which meta-search
/usr/local/bin/meta-search
symlinking it into one of the dir’s it is checking, resolves the issue
root@8e6eb90be27e:/usr/local/lib/node_modules/meta-search/bin# ln -nfs /usr/local/lib/node_modules/meta-search/bin/meta-search /usr/local/lib/node_modules/.bin/meta-search
root@8e6eb90be27e:/usr/local/lib/node_modules/meta-search/bin# meta search
meta
meta Resolving plugins: +0ms
meta /usr/local/lib/node_modules/meta-search/bin/node_modules +1ms
meta /usr/local/lib/node_modules/meta-search/node_modules +0ms
meta /usr/local/lib/node_modules/node_modules +1ms
meta /usr/local/lib/node_modules +1ms
meta + meta-bump +0ms
meta + meta-project +0ms
meta + meta-search +0ms
meta /usr/local/node_modules +0ms
meta /usr/node_modules +0ms
meta /node_modules +1ms
meta /usr/local/lib/node_modules +268ms
meta + meta-bump (skip) +0ms
meta + meta-project (skip) +0ms
meta + meta-search (skip) +0ms
meta
meta Loading plugins: +0ms
meta + meta-bump /usr/local/lib/node_modules/meta-bump +0ms
meta + meta-project /usr/local/lib/node_modules/meta-project +0ms
meta + meta-search /usr/local/lib/node_modules/meta-search +1ms
meta
meta Loading core plugins: +3ms
meta + meta-git /usr/local/lib/node_modules/meta/node_modules/meta-git +1ms
meta + meta-init /usr/local/lib/node_modules/meta/node_modules/meta-init +0ms
meta + meta-loop /usr/local/lib/node_modules/meta/node_modules/meta-loop +34ms
meta + meta-project (skip) +35ms
find-module-bin looking for meta-search at /usr/local/lib/node_modules/meta-search/bin/node_modules/.bin/meta-search +0ms
find-module-bin looking for meta-search at /usr/local/lib/node_modules/meta-search/node_modules/.bin/meta-search +0ms
find-module-bin looking for meta-search at /usr/local/lib/node_modules/.bin/meta-search +0ms
find-module-bin found meta-search at /usr/local/lib/node_modules/.bin/meta-search +0ms
Usage: meta-search [options] [command]
Options:
-h, --help display help for command
Commands:
package Find packages in package.json that match given criteria
help [command] display help for command
Issue Analytics
- State:
- Created a year ago
- Comments:7 (2 by maintainers)
Top Results From Across the Web
Revising the Rules - Is Commander Damage Outdated?
Commander Damage has been a part of EDH for as long as the format has existed, but has it outlived its usefulness in...
Read more >Is Commander Damage Outdated? Do We Still Need It?
If a player has 18 commander damage in them, all 3+ power commanders are lethal. It lets voltron decks set up other non-voltron...
Read more >The Problem with Commander is Everyone Else
Are you looking to Play the Game or Do the Thing? Finding the right Commander playgroup is hard, but Alex has some tips...
Read more >Replacing Outdated Commander Staples | EDH | CMDR | MtG
Over the last few weeks, we've been highlighting what we think our best secrets of Commander are. Today, we cap things off by...
Read more >Commanders rebrand not enough to make fans forget ...
"It seems like things are outdated," said Commanders fan Chuck Scott, a 43-year-old D.C. native, before the game.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
We have a forked version of commander - @mateodelnorte I know you made this commander fork but I am not clear on what the reason was for that or if the newest version of commander ever resolved this?
https://github.com/mateodelnorte/meta/blob/master/package.json#L55
It’s currently 594 commits behind mainline
If the mainline version of commander is still not adequate for what we need maybe there’s another tool we could replace it with?
There was some more conversation about this here in the past as well: https://github.com/mateodelnorte/meta/issues/77