allure-js icon indicating copy to clipboard operation
allure-js copied to clipboard

allure-js-commons + cypress+ esbuild can not resolve "fs/promises"

Open mysticdevx opened this issue 2 years ago • 3 comments

Describe the bug Hi I am using cypress+esbuild with allure-js. When I was using the v2.0.0-beta.18 version, all was ok, But when I upgraded to v2.1.0 I started getting:

Error: Build failed with one error:
../../node_modules/allure-js-commons/dist/src/utils.js:8:27: ERROR: Could not resolve "fs/promises"

What I tried When I change the const promises_1 = require("fs/promises"); to const promises_1 = require("fs").promises; in node_modules/allure-js-commons/dist/src/utils.js file, again, all works as expected.

Expected behavior allure-js to work with esbuild +cypress without having the given error

Desktop (please complete the following information):

  • OS: MacOS 13.2
  • Browser: any - because tests are running in cypress
  • Node Version: 14.20.1
  • Esbuild Version: 0.15.13

mysticdevx avatar Mar 09 '23 16:03 mysticdevx

hello @mysticdevx can you please provide simple example repo with allure-js-commons + cypress+ esbuild combination for the fast fix

vovsemenv avatar Mar 09 '23 16:03 vovsemenv

@vovsemenv Hi, yes, I will prepare a clean repo in a few days and will update it here. Thanks.

mysticdevx avatar Mar 09 '23 17:03 mysticdevx

image

Maybe it's a node issue? Just curious if upgrading node to v16 for instance kills the issue

kobenguyent avatar Mar 19 '23 06:03 kobenguyent