raine / ramda-cli

:ram: A CLI tool for processing data with functional pipelines
ISC License
573 stars 12 forks source link

Import no longer works with npm 8+ #37

Open mattlqx opened 2 years ago

mattlqx commented 2 years ago

Using the --import flag with node 16/npm 8 returns an error like:

/usr/local/node-v16.13.1-linux-x64/lib/node_modules/ramda-cli/node_modules/global-npm/index.js:37
      throw e
      ^

Error: The programmatic API was removed in npm v8.0.0
    at Object.<anonymous> (/usr/local/node-v16.13.1-linux-x64/lib/node_modules/npm/index.js:4:9)
    at Module._compile (node:internal/modules/cjs/loader:1101:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1153:10)
    at Module.load (node:internal/modules/cjs/loader:981:32)
    at Function.Module._load (node:internal/modules/cjs/loader:822:12)
    at Module.require (node:internal/modules/cjs/loader:1005:19)
    at require (node:internal/modules/cjs/helpers:102:18)
    at /usr/local/node-v16.13.1-linux-x64/lib/node_modules/ramda-cli/node_modules/global-npm/index.js:29:15
    at Object.<anonymous> (/usr/local/node-v16.13.1-linux-x64/lib/node_modules/ramda-cli/node_modules/global-npm/index.js:41:3)
    at Module._compile (node:internal/modules/cjs/loader:1101:14)

Specifically, I was trying to use the time-ago module like in the cookbook example.