rubyforgood / Flaredown

Flaredown web app and API
http://www.flaredown.com
GNU General Public License v3.0
39 stars 15 forks source link

Bump npm to 7.0.0 #620

Closed johnpaulashenfelter closed 1 year ago

johnpaulashenfelter commented 1 year ago

Following the instructions with node v12.2.6 led to

❯ npm install
npm ERR! code ENOTSUP
npm ERR! notsup Unsupported engine for flaredown@0.0.0: wanted: {"bower":"1.x","node":"12.22.6","npm":">=7.0.0"} (current: {"node":"12.22.6","npm":"6.14.15"})
npm ERR! notsup Not compatible with your version of node/npm: flaredown@0.0.0
npm ERR! notsup Not compatible with your version of node/npm: flaredown@0.0.0
npm ERR! notsup Required: {"bower":"1.x","node":"12.22.6","npm":">=7.0.0"}
npm ERR! notsup Actual:   {"npm":"6.14.15","node":"12.22.6"}

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/jp/.npm/_logs/2023-07-27T20_41_30_304Z-debug.log

This PR upgrades the npm version to the minimum version npm install -g npm@7.0.0

johnpaulashenfelter commented 1 year ago

The CI script uses npm@latest which no longer works with node 12.22.6. Locking to the minimal valid version (7.0.0)

Run npm install
ERROR: npm v9.8.1 is known not to run on Node.js v12.22.6.  This version of npm supports the following node versions: `^14.17.0 || ^16.13.0 || >=18.0.0`. You can find the latest version at [https://nodejs.org/.](https://nodejs.org/)

ERROR:
/opt/hostedtoolcache/node/12.22.6/x64/lib/node_modules/npm/lib/utils/exit-handler.js:19
  const hasLoadedNpm = npm?.config.loaded
                           ^

SyntaxError: Unexpected token '.'
    at wrapSafe (internal/modules/cjs/loader.js:915:16)
    at Module._compile (internal/modules/cjs/loader.js:963:27)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)
    at Module.load (internal/modules/cjs/loader.js:863:32)
    at Function.Module._load (internal/modules/cjs/loader.js:708:14)
    at Module.require (internal/modules/cjs/loader.js:887:19)
    at require (internal/modules/cjs/helpers.js:74:18)
    at module.exports (/opt/hostedtoolcache/node/12.22.6/x64/lib/node_modules/npm/lib/cli-entry.js:15:23)
    at module.exports (/opt/hostedtoolcache/node/12.22.6/x64/lib/node_modules/npm/lib/es6/validate-engines.js:39:10)
    at module.exports (/opt/hostedtoolcache/node/12.22.6/x64/lib/node_modules/npm/lib/cli.js:4:31)
Error: Process completed with exit code 1.