From fa08ddcbd83a833abf69bc7825b8461d53f3d9e6 Mon Sep 17 00:00:00 2001 From: Sean Yesmunt Date: Thu, 8 Aug 2019 13:26:09 -0400 Subject: [PATCH] add warning if running yarn with NODE_ENV=production --- package.json | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/package.json b/package.json index 6757ce45a..cdb528a1c 100644 --- a/package.json +++ b/package.json @@ -37,18 +37,17 @@ "flow-defs": "flow-typed install", "precommit": "lint-staged", "preinstall": "yarn cache clean lbry-redux && yarn cache clean lbryinc", - "postinstall": "if-env APP_ENV=web && echo 'Done installing deps' || yarn postinstall:electron", - "postinstall:electron": "electron-builder install-app-deps && node ./build/downloadDaemon.js" + "postinstall": "if-env NODE_ENV=production && yarn postinstall:warning || if-env APP_ENV=web && echo 'Done installing deps' || yarn postinstall:electron", + "postinstall:electron": "electron-builder install-app-deps && node ./build/downloadDaemon.js", + "postinstall:warning": "echo '\n\nWARNING\n\nNot all node modules were installed because NODE_ENV is set to \"production\".\nThis should only be set after installing dependencies with \"yarn\". The app will not work.\n\n'" }, "dependencies": { - "@reach/menu-button": "^0.1.18", - "@reach/tooltip": "^0.2.1", "electron-dl": "^1.11.0", "electron-log": "^2.2.12", "electron-updater": "^4.1.2", "express": "^4.16.4", - "keytar": "^4.4.1", - "tiny-relative-date": "^1.3.0" + "if-env": "^1.0.4", + "keytar": "^4.4.1" }, "devDependencies": { "@babel/core": "^7.0.0", @@ -65,6 +64,7 @@ "@hot-loader/react-dom": "16.8", "@lbry/color": "^1.0.2", "@lbry/components": "^2.7.4", + "@reach/menu-button": "^0.1.18", "@reach/rect": "^0.2.1", "@reach/tabs": "^0.1.5", "@reach/tooltip": "^0.2.1", @@ -122,7 +122,6 @@ "hast-util-sanitize": "^1.1.2", "history": "^4.9.0", "husky": "^0.14.3", - "if-env": "^1.0.4", "jsmediatags": "^3.8.1", "json-loader": "^0.5.4", "lbry-format": "https://github.com/lbryio/lbry-format.git", @@ -180,6 +179,7 @@ "terser-webpack-plugin": "^1.2.3", "three": "^0.93.0", "three-full": "^17.1.0", + "tiny-relative-date": "^1.3.0", "tree-kill": "^1.1.0", "unist-util-visit": "^1.4.1", "video.js": "^7.2.2",