0

I have setup the tests to run in a ubuntu server machine. But for some reason, I am not able to run the tests in my ubuntu machine . The same test can be successfully run in a windows machine as welll as in a mac machine but not in an Ubuntu Machine.

The error is below

Error: Can't walk dependency graph: Cannot find module 'fsevents' from '/home/timothyrajan/Documents/cypress/smokebdd/node_modules/chokidar/lib'
    required by /home/timothyrajan/Documents/cypress/smokebdd/node_modules/chokidar/lib/fsevents-handler.js
    at /home/timothyrajan/Documents/cypress/smokebdd/node_modules/browser-resolve/node_modules/resolve/lib/async.js:46:17
    at process (/home/timothyrajan/Documents/cypress/smokebdd/node_modules/browser-resolve/node_modules/resolve/lib/async.js:173:43)
    at ondir (/home/timothyrajan/Documents/cypress/smokebdd/node_modules/browser-resolve/node_modules/resolve/lib/async.js:188:17)
    at load (/home/timothyrajan/Documents/cypress/smokebdd/node_modules/browser-resolve/node_modules/resolve/lib/async.js:69:43)
    at onex (/home/timothyrajan/Documents/cypress/smokebdd/node_modules/browser-resolve/node_modules/resolve/lib/async.js:92:31)
    at /home/timothyrajan/Documents/cypress/smokebdd/node_modules/browser-resolve/node_modules/resolve/lib/async.js:22:47
    at callback (/home/timothyrajan/.cache/Cypress/7.4.0/Cypress/resources/app/packages/server/node_modules/graceful-fs/polyfills.js:289:20)
    at FSReqCallback.oncomplete (fs.js:183:21)

Is there a dependency on fsevents ??

I tried installing fsevents as a separate npm package.

I got the following response.

npm ERR! code EBADPLATFORM
npm ERR! notsup Unsupported platform for fsevents@2.3.2: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm ERR! notsup Valid OS:    darwin

Is there a way to overcome this scenario ?? This applies both to cucumber tests and non-cucumber tests.

Timothy Rajan
  • 1,947
  • 8
  • 38
  • 62
  • fsevents is only installed for macos. It is not installed on Linux. You should not be seeing this error "Cannot find module 'fsevents' from" at all. So, kinda strange. Solution: rm -rf node_modules package-lock.json yarn.lock and then npm install or yarn install Ensure you are using chokidar v3 and higher! Chokidar v2 uses fsevents v1, which is deprecated. Note: you will need to use node.js v8.10 or higher for chokidar v3. Please navigate to https://github.com/paulmillr/chokidar/issues/828 https://github.com/angular/angular/issues/13935 – Atul KS Jun 11 '21 at 05:00
  • Can you please try this one- https://stackoverflow.com/questions/52125641/electronwebpack-module-not-found-error-cant-resolve-fsevents-fs-etc-in-cho/67829712#67829712 – Atul KS Jun 11 '21 at 05:01
  • @AtulKumarSharma - Some how, my reply was not registered. Apologies for the late reply and thank you. I tried your first comment but the issue still persists. I have created a github repo of the project. Can you please have a look into this . – Timothy Rajan Jun 17 '21 at 10:52
  • https://github.com/timrajan/mybdd - thats the project repo in github – Timothy Rajan Jun 17 '21 at 10:52

0 Answers0