I am trying to run some cucumber tests with javascript but I keep getting this error. Do i need to change my execute path if yes, how can i do it? I have tried to install cucumber locally and globally but it does not seem to get resolved
cucumber-js
Error:
You appear to be executing an install of cucumber (most likely a global install)
that is different from your local install (the one required in your support files).
For cucumber to work, you need to execute the same install that is required in your support files.
Please execute the locally installed version to run your tests.
Executed Path: /usr/local/lib/node_modules/cucumber/lib/index.js
Local Path: /Users/chiragverma/node_modules/cucumber/lib/index.js
at /usr/local/lib/node_modules/cucumber/lib/cli/install_validator.js:22:13
at Generator.next (<anonymous>)
at Generator.tryCatcher (/usr/local/lib/node_modules/cucumber/node_modules/bluebird/js/release/util.js:16:23)
at PromiseSpawn._promiseFulfilled (/usr/local/lib/node_modules/cucumber/node_modules/bluebird/js/release/generators.js:97:49)
at Promise._settlePromise (/usr/local/lib/node_modules/cucumber/node_modules/bluebird/js/release/promise.js:574:26)
at Promise._settlePromise0 (/usr/local/lib/node_modules/cucumber/node_modules/bluebird/js/release/promise.js:614:10)
at Promise._settlePromises (/usr/local/lib/node_modules/cucumber/node_modules/bluebird/js/release/promise.js:693:18)
at Async._drainQueue (/usr/local/lib/node_modules/cucumber/node_modules/bluebird/js/release/async.js:133:16)
at Async._drainQueues (/usr/local/lib/node_modules/cucumber/node_modules/bluebird/js/release/async.js:143:10)
at Immediate.Async.drainQueues (/usr/local/lib/node_modules/cucumber/node_modules/bluebird/js/release/async.js:17:14)
at runCallback (timers.js:789:20)
at tryOnImmediate (timers.js:751:5)
at processImmediate [as _immediateCallback] (timers.js:722:5)
Chirags-MacBook-Air:test chiragverma$ sudo cp /Users/chiragverma/ /usr/local/lib/
Password:
Sorry, try again.
Password:
cp: /Users/chiragverma/ is a directory (not copied).
Chirags-MacBook-Air:test chiragverma$ cucumber-js
Error:
You appear to be executing an install of cucumber (most likely a global install)
that is different from your local install (the one required in your support files).
For cucumber to work, you need to execute the same install that is required in your support files.
Please execute the locally installed version to run your tests.
Executed Path: /usr/local/lib/node_modules/cucumber/lib/index.js
Local Path: /Users/chiragverma/node_modules/cucumber/lib/index.js
at /usr/local/lib/node_modules/cucumber/lib/cli/install_validator.js:22:13
at Generator.next (<anonymous>)
at Generator.tryCatcher (/usr/local/lib/node_modules/cucumber/node_modules/bluebird/js/release/util.js:16:23)
at PromiseSpawn._promiseFulfilled (/usr/local/lib/node_modules/cucumber/node_modules/bluebird/js/release/generators.js:97:49)
at Promise._settlePromise (/usr/local/lib/node_modules/cucumber/node_modules/bluebird/js/release/promise.js:574:26)
at Promise._settlePromise0 (/usr/local/lib/node_modules/cucumber/node_modules/bluebird/js/release/promise.js:614:10)
at Promise._settlePromises (/usr/local/lib/node_modules/cucumber/node_modules/bluebird/js/release/promise.js:693:18)
at Async._drainQueue (/usr/local/lib/node_modules/cucumber/node_modules/bluebird/js/release/async.js:133:16)
at Async._drainQueues (/usr/local/lib/node_modules/cucumber/node_modules/bluebird/js/release/async.js:143:10)
at Immediate.Async.drainQueues (/usr/local/lib/node_modules/cucumber/node_modules/bluebird/js/release/async.js:17:14)
at runCallback (timers.js:789:20)
at tryOnImmediate (timers.js:751:5)
at processImmediate [as _immediateCallback] (timers.js:722:5)
Chirags-MacBook-Air:test chiragverma$ sudo cp /Users/chiragverma /usr/local/lib
cp: /Users/chiragverma is a directory (not copied).