diff --git a/README.md b/README.md index 6a29c416..e336425a 100644 --- a/README.md +++ b/README.md @@ -39,7 +39,8 @@ To update the SDK to the latest version run: git pull origin master scripts/install-sdk.sh -Please note that Cloud9 v3 is currently developed with Node.js 0.12 and 0.10. Newer versions of node should work too. +Please note that if you are using npm version >=3 and run npm install manually, you need to run `git checkout HEAD -- node_modules` to restore the files deleted by npm. +Cloud9 is known to work with node versions 0.10 to 8, but Newer versions should work too. #### Starting Cloud9 #### diff --git a/package.json b/package.json index f9892738..b24e75cb 100644 --- a/package.json +++ b/package.json @@ -48,12 +48,5 @@ "start": "node server.js" }, "devDependencies": {}, - "licenses": [], - "bundledDependencies": [ - "amd-loader", - "architect", - "architect-build", - "msgpack-js", - "c9" - ] + "licenses": [] } \ No newline at end of file diff --git a/scripts/install-sdk.sh b/scripts/install-sdk.sh index 7acfd55b..00335604 100755 --- a/scripts/install-sdk.sh +++ b/scripts/install-sdk.sh @@ -50,13 +50,15 @@ resetColor=$'\e[0m' updateNodeModules() { echo "${magenta}--- Running npm install --------------------------------------------${resetColor}" - safeInstall(){ - deps=$("$NODE" -e 'console.log(Object.keys(require("./package.json").dependencies).join(" "))'); - for m in ${deps[@]}; do echo "$m"; - "$NPM" install --loglevel warn "$m" - done - } - "$NPM" install || safeInstall + "$NPM" install --production + + for i in $(git show HEAD:node_modules/); do + if [ "$i" != tree ] && [ "$i" != "HEAD:node_modules/" ]; then + [ -d node_modules/$i ] || git checkout HEAD -- node_modules/$i; + fi + done + rm -f package-lock.json + echo "${magenta}--------------------------------------------------------------------${resetColor}" }