Skip to content

Commit d76a6ac

Browse files
committed
correct dir
1 parent 8092139 commit d76a6ac

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

nodeapp.js

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -72,11 +72,11 @@ module.exports = function(path) {
7272
details.linkGlobalModules = function(modules) {
7373

7474
// Ensure node_modules directory exists
75-
const fs = require('fs');
76-
if (!fs.existsSync('node_modules')) {
77-
fs.mkdirSync('node_modules');
75+
const nodeModulesPath = this.cwd + '/node_modules';
76+
if (!fs.existsSync(nodeModulesPath)) {
77+
fs.mkdirSync(nodeModulesPath);
7878
}
79-
79+
8080
// Setup nvm, use npm version specified in .nvmrc
8181
let cmd = "bash -c 'export NVM_DIR=/opt/nvm && source /opt/nvm/nvm.sh && nvm use " + this.version + " && ";
8282
cmd += "cd " + this.cwd + " && ";
@@ -86,7 +86,6 @@ module.exports = function(path) {
8686
cmd += "unlink node_modules/" + modules[i] + " > /dev/null 2>&1 ; npm link " + modules[i] + " > /dev/null 2>&1 ; ";
8787
}
8888
cmd += "'";
89-
console.log(cmd);
9089

9190
// Update npm links
9291
try {

0 commit comments

Comments
 (0)