diff --git a/local-cli/generator/templates.js b/local-cli/generator/templates.js index 54a09613b2b0cf..4d880d1bc8445b 100644 --- a/local-cli/generator/templates.js +++ b/local-cli/generator/templates.js @@ -75,7 +75,17 @@ function createFromRemoteTemplate( templateName = template.substr(template.lastIndexOf('/') + 1); } else { // e.g 'demo' - installPackage = 'react-native-template-' + template; + let scope = ''; + if ( + template[0] === '@' && + template.length > 3 && + template.includes('/', 2) + ) { + [scope, ...template] = template.split('/'); + scope += '/'; + template = template.join('/'); + } + installPackage = `${scope}react-native-template-${template}`; templateName = installPackage; }