Run the following npx command in a directory that has an existing node_modules with one of the modules already installed. When mixing implict and specific like below, npx crashes when it tries to tread undefined as a string.
32 verbose stack TypeError: Cannot read property 'replace' of undefined
32 verbose stack at .nvm/versions/node/v14.16.0/lib/node_modules/npm/node_modules/libnpmexec/lib/index.js:163:47
32 verbose stack at Array.map (<anonymous>)
32 verbose stack at exec (.nvm/versions/node/v14.16.0/lib/node_modules/npm/node_modules/libnpmexec/lib/index.js:163:31)
Not sure if it crashes because of the missing version specifier @babel/core when it already has a fixed version in package.json or something else.
Expected Behavior
Expect it to prompt for installation (the first time it is run):
$ npx -p gitmoji-cli@1.0.0 -p @babel/core@7 gitmoji -l
Need to install the following packages:
@babel/core@7
gitmoji-cli@1.0.0
Ok to proceed? (y)
Steps To Reproduce
# create a new dir with an empty package.json
mkdir fresh-dir && cd fresh-dir && npm init -y
npm i @babel/core
npx -p gitmoji-cli@1.0.0 -p @babel/core gitmoji -l
Is there an existing issue for this?
Current Behavior
Run the following npx command in a directory that has an existing node_modules with one of the modules already installed. When mixing implict and specific like below, npx crashes when it tries to tread
undefined
as a string.Here is the stack trace from the debug log:
Not sure if it crashes because of the missing version specifier @babel/core when it already has a fixed version in package.json or something else.
Expected Behavior
Expect it to prompt for installation (the first time it is run):
Steps To Reproduce
Environment