mirror of
https://github.com/strapi/strapi.git
synced 2025-11-29 16:41:19 +00:00
Use require resolve
This commit is contained in:
parent
97defacf47
commit
ca729a8f68
@ -51,7 +51,9 @@ async function downloadNpmTemplate({ name, version }, parentDir) {
|
|||||||
});
|
});
|
||||||
|
|
||||||
// Return the path of the actual template
|
// Return the path of the actual template
|
||||||
const exactTemplatePath = path.resolve(parentDir, 'node_modules', name);
|
const exactTemplatePath = path.dirname(
|
||||||
|
require.resolve(path.join(name, 'package.json'), { paths: [parentDir] })
|
||||||
|
);
|
||||||
return exactTemplatePath;
|
return exactTemplatePath;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user