npx-import
Advanced tools
Comparing version 1.0.3 to 1.0.4-0
@@ -117,3 +117,3 @@ import semver from 'semver'; | ||
const fullCmd = `${installPackage} ${emitPath}`; | ||
const { failed, stdout } = await execaCommand(fullCmd, { | ||
const { failed, stdout, stderr } = await execaCommand(fullCmd, { | ||
shell: true, | ||
@@ -126,4 +126,8 @@ }); | ||
const tempPath = paths.find((p) => /\/\.npm\/_npx\//.exec(p)); | ||
if (!tempPath) | ||
if (!tempPath) { | ||
console.log({ stdout }); | ||
console.log({ stderr }); | ||
console.log({ paths }); | ||
throw new Error(`Failed to find temporary install directory. Looking for paths matching '/.npm/_npx/' in:\n${JSON.stringify(paths)}`); | ||
} | ||
// Expecting the path ends with node_modules/.bin | ||
@@ -130,0 +134,0 @@ const nodeModulesPath = path.resolve(tempPath, '..'); |
{ | ||
"name": "npx-import", | ||
"version": "1.0.3", | ||
"version": "1.0.4-0", | ||
"description": "Runtime dependencies, installed as if by magic ✨", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
@@ -152,3 +152,3 @@ import semver from 'semver' | ||
const fullCmd = `${installPackage} ${emitPath}` | ||
const { failed, stdout } = await execaCommand(fullCmd, { | ||
const { failed, stdout, stderr } = await execaCommand(fullCmd, { | ||
shell: true, | ||
@@ -164,3 +164,6 @@ }) | ||
if (!tempPath) | ||
if (!tempPath) { | ||
console.log({stdout}) | ||
console.log({stderr}) | ||
console.log({paths}) | ||
throw new Error( | ||
@@ -171,2 +174,3 @@ `Failed to find temporary install directory. Looking for paths matching '/.npm/_npx/' in:\n${JSON.stringify( | ||
) | ||
} | ||
@@ -173,0 +177,0 @@ // Expecting the path ends with node_modules/.bin |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
58224
884
1