0

My situation is, I am trying to install postman-to-k6 to get insight how to work with conversions from postman to K6. My attempts install the software on both my Ubuntu machine and my mac, have been unsuccessfully.

So my question is am I missing something fundamentally step to install the the postman-to-k6 tool and in that case what would that be or is there something wrong with the npm package?

I have tried following this process described here:

https://k6.io/blog/load-testing-with-postman-collections

When i get to the step to use the following command npm install -g postman-to-k6 in the terminal, this output is showing up on the Ubuntu machine:

martin.jonsson@unassigned:~$ npm install -g postman-to-k6
loadDep:xml2js → addNameR ▌ ╢██████████░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░╟
WARN engine eslint@7.23.0: wanted: {"node":"^10.12.0 || >=12.0.0"} (current: {"nloadDep:xml2js → addNameR ▀ ╢██████████░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░╟
WARN engine husky@4.3.8: wanted: {"node":">=10"} (current: {"node":"8.10.0","npmnpm WARN deprecated cheerio-select-tmp@0.1.1: Use cheerio-select instead
loadDep:v8-compile-cache  ▀ ╢█████████████░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░╟
WARN engine chalk@4.1.0: wanted: {"node":">=10"} (current: {"node":"8.10.0","npmloadDep:v8-compile-cache  ▐ ╢█████████████░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░╟
WARN engine espree@7.3.1: wanted: {"node":"^10.12.0 || >=12.0.0"} (current: {"node":"8.10.0","npm":"3.5.2"})
WARN engine file-entry-cache@6.0.1: wanted: {"node":"^10.12.0 || >=12.0.0"} (current: {"node":"8.10.0","npm":"3.5.2"})
WARN engine table@6.0.9: wanted: {"node":">=10.0.0"} (current: {"node":"8.10.0","npm":"3.5.2"})
WARN engine @eslint/eslintrc@0.4.0: wanted: {"node":"^10.12.0 || >=12.0.0"} (curloadDep:v8-compile-cache  ▐ ╢█████████████░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░╟
WARN engine semver@7.3.5: wanted: {"node":">=10"} (current: {"node":"8.10.0","nploadDep:v8-compile-cache  ▄ ╢█████████████░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░╟
WARN engine eslint-visitor-keys@2.0.0: wanted: {"node":">=10"} (current: {"node"loadDep:eslint-visitor-ke ▀ ╢█████████████░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░╟
WARN engine flat-cache@3.0.4: wanted: {"node":"^10.12.0 || >=12.0.0"} (current: npm ERR! Linux 5.4.0-70-generic
npm ERR! argv "/usr/bin/node" "/usr/bin/npm" "install" "-g" "postman-to-k6"
npm ERR! node v8.10.0
npm ERR! npm  v3.5.2
npm ERR! code EMISSINGARG

npm ERR! typeerror Error: Missing required argument #1
npm ERR! typeerror     at andLogAndFinish (/usr/share/npm/lib/fetch-package-metadata.js:31:3)
npm ERR! typeerror     at fetchPackageMetadata (/usr/share/npm/lib/fetch-package-metadata.js:51:22)
npm ERR! typeerror     at resolveWithNewModule (/usr/share/npm/lib/install/deps.js:456:12)
npm ERR! typeerror     at /usr/share/npm/lib/install/deps.js:457:7
npm ERR! typeerror     at /usr/share/npm/node_modules/iferr/index.js:13:50
npm ERR! typeerror     at /usr/share/npm/lib/fetch-package-metadata.js:37:12
npm ERR! typeerror     at addRequestedAndFinish (/usr/share/npm/lib/fetch-package-metadata.js:82:5)
npm ERR! typeerror     at returnAndAddMetadata (/usr/share/npm/lib/fetch-package-metadata.js:117:7)
npm ERR! typeerror     at pickVersionFromRegistryDocument (/usr/share/npm/lib/fetch-package-metadata.js:134:20)
npm ERR! typeerror     at /usr/share/npm/node_modules/iferr/index.js:13:50
npm ERR! typeerror This is an error with npm itself. Please report this error at:
npm ERR! typeerror     <http://github.com/npm/npm/issues>

npm ERR! Please include the following file with any support request:
npm ERR!     /home/martin.jonsson/npm-debug.log

1 Answers1

1

You're running a really really old version of NodeJS. The logs are trying to tell you that you need to run a version between 10.12.0 and 12.0.0:

wanted: {"node":"^10.12.0 || >=12.0.0"}

While I'm unable to reproduce the error on my machine, I'd definitely recommend you to start by upgrading to a more recent version of NodeJS.

Dharman
  • 30,962
  • 25
  • 85
  • 135
simme
  • 1,514
  • 12
  • 23
  • Thanks this helped me to get further on the way, but there seems to be some other challenges. I seem to get this error now instead: Error: EACCES: permission denied, mkdir '/usr/local/lib/node_modules/postman-to-k6/vendor' – Martin Jönsson Mar 30 '21 at 13:52
  • I think i solved it using this solution: You need to change ownership of node_modules, because you use sudo npm install -g "node-sass so its ownership set to root, To change ownership to current user as group - sudo chown -R root:YOUR_USERNAME /usr/local/lib/node_modules/ sudo chmod -R 775 /usr/local/lib/node_modules/ As stated in this awnser: https://stackoverflow.com/questions/49679808/error-eacces-permission-denied-mkdir-usr-local-lib-node-modules-node-sass-b – Martin Jönsson Mar 30 '21 at 14:52