diff --git a/lib/actions/ProjectInstall.js b/lib/actions/ProjectInstall.js index a9527712f..5b0870e49 100644 --- a/lib/actions/ProjectInstall.js +++ b/lib/actions/ProjectInstall.js @@ -164,7 +164,7 @@ module.exports = function(S) { .then(() => fse.copyAsync(S.getServerlessPath('templates', 'nodejs', 'package.json'), path.join(tmpDir, 'package.json'))) .then(() => BbPromise.fromCallback(cb => exec('npm install ' + projName, cb))) .then(() => fse.moveAsync(path.join(tmpDir, 'node_modules', projName), path.join(userCwd, projName))) - .then(() => fse.moveAsync(path.join(tmpDir, 'node_modules'), path.join(userCwd, projName, 'node_modules'))) + .then(() => fse.copyAsync(path.join(tmpDir, 'node_modules'), path.join(userCwd, projName, 'node_modules'))) .then(() => process.chdir(userCwd)) .then(() => fse.removeAsync(tmpDir)); }