Browse Source

Force Node version (#1473)

Diyahir 1 year ago
parent
commit
c58b675a63
4 changed files with 9 additions and 1 deletions
  1. 1 0
      .npmrc
  2. 2 1
      README.md
  3. 3 0
      package-lock.json
  4. 3 0
      package.json

+ 1 - 0
.npmrc

@@ -0,0 +1 @@
+engine-strict=true

+ 2 - 1
README.md

@@ -79,10 +79,11 @@ Lerna has some common failure modes that you may encounter:
 1. `npm ci` fails with a typescript compilation error about a missing package.
    This error likely means that the failing package has a `prepare` entry compiling the typescript in its `package.json`.
    Fix this error by moving that logic to the `prepublishOnly` entry.
-1. The software builds locally but fails in CI, or vice-versa.
+2. The software builds locally but fails in CI, or vice-versa.
    This error likely means that some local build caches need to be cleaned.
    The build error may not indicate that this is a caching issue, e.g., it may appear that the packages are being built in the wrong order.
    Delete `node_modules/`, `lib/` and `tsconfig.tsbuildinfo` from each package's subdirectory. then try again.
+3. `npm ci` fails due to wrong node version. Make sure to be using `v18`. Node version `v21` is not supported and known to cause issues.
 
 ## Audit / Feature Status
 

+ 3 - 0
package-lock.json

@@ -39,6 +39,9 @@
       },
       "devDependencies": {
         "lerna": "^6.4.1"
+      },
+      "engines": {
+        "node": ">=16.0.0 <19.0.0"
       }
     },
     "apps/price_pusher": {

+ 3 - 0
package.json

@@ -33,5 +33,8 @@
   "devDependencies": {
     "lerna": "^6.4.1"
   },
+  "engines" : { 
+    "node" : ">=16.0.0 <19.0.0"
+  },
   "version": "0.0.1"
 }