Ne4istb / postman-combine-collections

A command line tool to combine several Postman collections into one
Apache License 2.0
16 stars 1 forks source link

does anyone sees this error before? #2

Closed ZiqiWill closed 6 years ago

ZiqiWill commented 6 years ago
$ postman-combine-collections -f ./test/ApiTest/test.collection/**/*.test.json
/usr/local/lib/node_modules/postman-combine-collections/index.js:61
  const isCorrectCollection = collection && collection.info && allowedSchemas.includes(collection.info.schema);
                                                                              ^

TypeError: allowedSchemas.includes is not a function
    at toFolder (/usr/local/lib/node_modules/postman-combine-collections/index.js:61:79)
    at Array.map (native)
    at combine (/usr/local/lib/node_modules/postman-combine-collections/index.js:55:29)
    at processFiles (/usr/local/lib/node_modules/postman-combine-collections/index.js:26:22)
    at Object.<anonymous> (/usr/local/lib/node_modules/postman-combine-collections/index.js:22:1)
    at Module._compile (module.js:409:26)
    at Object.Module._extensions..js (module.js:416:10)
    at Module.load (module.js:343:32)
    at Function.Module._load (module.js:300:12)
    at Function.Module.runMain (module.js:441:10)
/bin/bash: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8)
Ne4istb commented 6 years ago

@ZiqiWill what nodejs version do you use? I believe method Array.includes is available since version 6.

ZiqiWill commented 6 years ago

@Ne4istb thanks so much, I believe it's because the apt-get in linux can not get the latest node version, it's works well in my windows server. I will try it on again when i update the node in linux, anyway thank you so much for reply.