在newman中运行postman集合时出现模块不匹配错误

时间:2016-04-04 20:32:32

标签: postman newman

尝试从newman运行postman集合时出现以下错误。 节点版本是 - v4.4.2 NPM版本为 - 2.15.0 纽曼版本是 - 2.0.5

newman -c TPO_Regression.json
    /usr/local/lib/node_modules/newman/node_modules/jsdom/node_modules/contextify/node_modules/bindings/bindings.js:83
            throw e
            ^

    Error: Module version mismatch. Expected 46, got 14.
        at Error (native)
        at Object.Module._extensions..node (module.js:434:18)
        at Module.load (module.js:343:32)
        at Function.Module._load (module.js:300:12)
        at Module.require (module.js:353:17)
        at require (internal/module.js:12:17)
        at bindings (/usr/local/lib/node_modules/newman/node_modules/jsdom/node_modules/contextify/node_modules/bindings/bindings.js:76:44)
        at Object.<anonymous> (/usr/local/lib/node_modules/newman/node_modules/jsdom/node_modules/contextify/lib/contextify.js:1:96)
        at Module._compile (module.js:409:26)
        at Object.Module._extensions..js (module.js:416:10)

1 个答案:

答案 0 :(得分:0)

这意味着您的Node版本已更新,因此您需要重建node_modules或重新安装Newman。

重建:

npm rebuild Newman

重新安装:

npm uninstall -g newman
npm install -g newman
相关问题