diff --git a/packages/generators/app/lib/utils/fetch-npm-template.js b/packages/generators/app/lib/utils/fetch-npm-template.js index e8ef012803..2afe8a1a9c 100644 --- a/packages/generators/app/lib/utils/fetch-npm-template.js +++ b/packages/generators/app/lib/utils/fetch-npm-template.js @@ -52,7 +52,7 @@ async function downloadNpmTemplate({ name, version }, parentDir) { // Return the path of the actual template const exactTemplatePath = path.dirname( - require.resolve(path.join(name, 'package.json'), { paths: [parentDir] }) + require.resolve(`${name}/package.json`, { paths: [parentDir] }) ); return exactTemplatePath; }