Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The tool assumes that the npm packages are installed using the same OS that will run the tests #282

Open
bingnz opened this issue Mar 14, 2022 · 4 comments

Comments

@bingnz
Copy link

bingnz commented Mar 14, 2022

I've run into lots of issues with running tests with results from BrowserStack that look like this:

 error: Cypress could not run any of the specs in the build since an exception occurred. The stacktrace of the error is given below:

--------------------------------------------------------------------------------
npm
WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@~2.3.2 (node_modules\chokidar\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.2.7 (node_modules\watchpack-chokidar2\node_modules\chokidar\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm WARN @cypress/[email protected] requires a peer of @babel/core@^7.0.1 but none is installed. You must install peer dependencies yourself.
npm WARN @cypress/[email protected] requires a peer of @babel/preset-env@^7.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN @cypress/[email protected] requires a peer of babel-loader@^8.0.2 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of encoding@^0.1.0 but none is installed. You must install peer dependencies yourself.
npm WARN e2e No description
npm WARN e2e No repository field.
npm WARN e2e No license field.

npm
 ERR! code EEXIST
npm ERR! path .\packages\xxx\tests\e2e\node_modules\.bin\webpack

npm ERR!
 Refusing to delete .\packages\xxx\tests\e2e\node_modules\.bin\webpack: is outside .\packages\xxx\tests\e2e\node_modules\webpack and not a link
npm ERR! File exists: .\packages\xxx\tests\e2e\node_modules\.bin\webpack
npm
ERR! Move it away, and try again.

I suspect that this might be happening because I build the test package using a Docker container on Linux, but the machine running the tests uses Windows.
Using cached packages for one OS and then trying to unzip them onto another OS is not going to work a lot of the time. I don't think the tool should be attempting to do this, or there should be some kind of opt-out.

@pranavj1001
Copy link
Member

Hey @bingnz ,

Thanks for bringing up this issue, while we look into this issue, if possible can you please share the list of npm_dependencies that you are using for your build?

Meanwhile, to circumvent this issue can you try setting cache_dependencies to false inside run_settings of your browserstack.json. Let us know if that solves your issue for now.

For more info, please visit this link.

@bingnz
Copy link
Author

bingnz commented Mar 14, 2022

Hi @pranavj1001. my dependencies are:

      "@aws-sdk/client-dynamodb": "3.47.0",
      "@cypress/webpack-preprocessor": "5.11.1",
      "aws4": "1.11.0",
      "chai-datetime": "1.8.0",
      "cypress": "9.4.1",
      "cypress-fail-on-console-error": "2.1.3",
      "dayjs": "1.10.7",
      "del": "4.1.1",
      "faker": "5.5.3",
      "inversify": "5.1.1",
      "lodash": "4.17.21",
      "minimist": "1.2.5",
      "mssql": "7.3.1",
      "mysql2": "2.3.3",
      "node-vault": "0.9.22",
      "reflect-metadata": "0.1.13",
      "ts-loader": "6.2.2",
      "tslib": "2.3.1",
      "tsconfig-paths-webpack-plugin": "3.5.2",
      "typescript": "4.6.2",
      "webpack": "4.46.0"

If I use cache_dependencies false, it seems that the build just hangs (or at least takes well over an hour). I don't have any of these problems locally.

@Inderjeet0007
Copy link

Hello @bingnz

Would it be possible for you to reach out to us (for the same issue) via [email protected]?

@bingnz
Copy link
Author

bingnz commented Mar 19, 2022

Thanks! Yes I've already done so a few days ago. I've had a few different problems, sometimes I get the npm issues as above and sometimes the build runs for two hours and then fails.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants