Open Graham42 opened 6 years ago
What is npx
? Is that a license supported by https://github.com/github/choosealicense.com (as stated on the readme)?
Oh, I see, npx
is something else. I don't know anything about npm, so I might need to rely on someone else to help.
That error message isn't very helpful, I'll look into why it's happening, but it might be something to do with npx
For reference, this is npx https://medium.com/@maybekatz/introducing-npx-an-npm-package-runner-55f7d4bd282b
@Graham42 I just looked into this some.
When using npx
with the -p
flag, npx
will download the package into a temporary "global" folder. The way generate
works is that it will look for modules in the actual npm global folder, local node_modules
folder, and for a local generator.js
file. Since npx
is putting generate-license
into a temporary folder, generate
doesn't know where to find it.
I tried this out by installing generate-license
locally: npm i generate-license
, then I was able to run npx
like this: npx -p generate gen license
.
I'm not sure if there's anything we can do since npx
is creating temporary directories sometimes.
Instead of installing anything globally, I've moved to use
npx
which comes with npm 5, which is default with node 8Expected this to work:
Instead I get this error trace