From f5992d3489e564f16b84b0b112e17c11c5b7fd73 Mon Sep 17 00:00:00 2001 From: Anton Kastritskiy Date: Wed, 15 Jun 2022 07:37:54 -0700 Subject: [PATCH] setup engines to stop people from using npm MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Summary: Following the discussion from D37080670 (https://github.com/facebook/flipper/commit/ea7ff7eb8a8ed999d0f14c8004c6cb62957a8486) Unfortunately at some people npm changed the order in which things happen when running `npm install` and now dependency resolution happens before validating engines 🤷‍♂️ But this will work regardless https://www.internalfb.com/intern/px/p/261cr Reviewed By: aigoncharov Differential Revision: D37142960 fbshipit-source-id: 306f1a4e7444dc099c1a11c4c9e22dafceacdbaa --- desktop/.npmrc | 1 + desktop/package.json | 5 +++++ 2 files changed, 6 insertions(+) create mode 100644 desktop/.npmrc diff --git a/desktop/.npmrc b/desktop/.npmrc new file mode 100644 index 000000000..c42da845b --- /dev/null +++ b/desktop/.npmrc @@ -0,0 +1 @@ +engine-strict = true diff --git a/desktop/package.json b/desktop/package.json index 1e701852f..aec21214c 100644 --- a/desktop/package.json +++ b/desktop/package.json @@ -163,6 +163,11 @@ "tsc-plugins": "./ts-node scripts/tsc-plugins.tsx", "watch": "cross-env TZ=Pacific/Pohnpei node --expose-gc --stack-trace-limit=40 ./node_modules/.bin/jest --watch" }, + "engines": { + "node": ">=16", + "npm": "use yarn instead", + "yarn": "^1.16" + }, "version": "0.149.0", "workspaces": { "packages": [