Title: ERROR: Could not resolve "util" in version 1.33.0 and up caused by unused import · Issue #1004 · browserstack/browserstack-cypress-cli · GitHub
Open Graph Title: ERROR: Could not resolve "util" in version 1.33.0 and up caused by unused import · Issue #1004 · browserstack/browserstack-cypress-cli
X Title: ERROR: Could not resolve "util" in version 1.33.0 and up caused by unused import · Issue #1004 · browserstack/browserstack-cypress-cli
Description: Version 1.33 and up attempt to import a module "util" in the folder "browserstack-cypress-cli/testObervability/cypress/index.js" The browserstack-cypress-cli module also does not include it in their dependencies, relying on another node ...
Open Graph Description: Version 1.33 and up attempt to import a module "util" in the folder "browserstack-cypress-cli/testObervability/cypress/index.js" The browserstack-cypress-cli module also does not include it in thei...
X Description: Version 1.33 and up attempt to import a module "util" in the folder "browserstack-cypress-cli/testObervability/cypress/index.js" The browserstack-cypress-cli module also does no...
Opengraph URL: https://github.com/browserstack/browserstack-cypress-cli/issues/1004
X: @github
Domain: github.com
IPv4 address: 140.82.114.4
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"ERROR: Could not resolve \"util\" in version 1.33.0 and up caused by unused import","articleBody":"Version 1.33 and up attempt to import a module \"util\" in the folder \"browserstack-cypress-cli/testObervability/cypress/index.js\" \nThe browserstack-cypress-cli module also does not include it in their dependencies, relying on another node module to have it as a dependency instead. \n\nLooking through the entire \"browserstack-cypress-cli/testObervability/cypress/index.js\" file, it looks like \"util\" is only assigned to a constant and never used anywhere in the module.\n\nEither add util as a dependency for browserstack-cypress-cli or remove \"util\" in this file.\n\nThe error I am seeing is this ( I have removed any personal information and replaced it with \"██\"):\n```\n\"This occurred while Cypress was compiling and bundling your test code. This is usually caused by:\n- A missing file or dependency\n- A syntax error in the file or one of its dependencies\nFix the error in your code and re-run your tests.\nOops...we found an error preparing this test file:\n > ██\\somefile.feature\n\nThe error was :\nError: Build failed with 1 error:\nnode_modules/browserstack-cypress-cli/bin/testObservability/cypress/index.js:5:21: ERROR: Could not resolve \"util\"\n at failureErrorWithLog (██\\node_modules\\esbuild\\lib\\main.js:1467:15)\n at ██\\node_modules\\esbuild\\lib\\main.js:926:25\n at runOnEndCallbacks (██\\node_modules\\esbuild\\lib\\main.js:1307:45)\n at buildResponseToResult (██\\node_modules\\esbuild\\lib\\main.js:924:7)\n at ██\\node_modules\\esbuild\\lib\\main.js:951:16\n at responseCallbacks.\u003ccomputed> (██\\node_modules\\esbuild\\lib\\main.js:603:9)\n at handleIncomingPacket ██\\node_modules\\esbuild\\lib\\main.js:658:12)\n at Socket.readFromStdout ██\\node_modules\\esbuild\\lib\\main.js:581:7)\n at Socket.emit (node:events:524:28)\n at addChunk (node:internal/streams/readable:561:12)\n at readableAddChunkPushByteMode (node:internal/streams/readable:512:3)\n at Readable.push (node:internal/streams/readable:392:5)\n at Pipe.onStreamRead (node:internal/stream_base_commons:189:23)\"\n\n```\n\nIn my current setup we are running `cypress@15.2.0` which has removed util as a dependency which may have caused a breaking change in browserstack-cypress-cli@1.33.0+\n\nhttps://docs.cypress.io/app/references/changelog#15-0-0\n\"In order to better align with best practices, @cypress/webpack-batteries-included-preprocessor no longer includes certain browser built-ins that were automatically provided by Webpack 4. The removed built-ins are assert, constants, crypto, domain, events, http, https, punycode, querystring, string_decoder, sys, timers, tty, url, **util**, vm, and zlib. However, we know that certain built-ins are popular, given that many users have files that are shared between their Cypress tests and node context. Because of this, @cypress/webpack-batteries-included-preprocessor will ship with built-in support for buffer, path, process, os, and stream. If there is a built-in that isn't supported by default and you need to add support, please refer to the Webpack [resolve.fallback](https://webpack.js.org/configuration/resolve/#resolvefallback) documentation and the [@cypress/webpack-batteries-included-preprocessor README](https://github.com/cypress-io/cypress/blob/develop/npm/webpack-batteries-included-preprocessor/README.md). Addresses [#31039](https://github.com/cypress-io/cypress/issues/31039).\"","author":{"url":"https://github.com/JessePomerenk","@type":"Person","name":"JessePomerenk"},"datePublished":"2025-09-25T17:15:39Z","url":"https://github.com/browserstack/browserstack-cypress-cli/issues/1004"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:107e96aa-269a-2675-8717-4df103236a5d |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | C44E:1CEC4E:379BF8:4D5F79:6B043D40 |
| html-safe-nonce | f8b5f2242b24a8c393a1a11d9a25d7a06bccec48fc2fcaab301577e70016fa04 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDNDRFOjFDRUM0RTozNzlCRjg6NEQ1Rjc5OjZCMDQzRDQwIiwidmlzaXRvcl9pZCI6IjUzMzY0NDcwMTUzOTAwMzUyNjQiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 2427985352812518eec9b115446fb3944aefce96ab2baec0d31ab45e266297e9 |
| hovercard-subject-tag | issue:3454471082 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/browserstack/browserstack-cypress-cli/1004/issue_layout |
| twitter:image | https://opengraph.githubassets.com/43a059a87cb74be30928632bb86c00e2fb28a2d637897d54204b9827dac2993a/browserstack/browserstack-cypress-cli/issues/1004 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/43a059a87cb74be30928632bb86c00e2fb28a2d637897d54204b9827dac2993a/browserstack/browserstack-cypress-cli/issues/1004 |
| og:image:alt | Version 1.33 and up attempt to import a module "util" in the folder "browserstack-cypress-cli/testObervability/cypress/index.js" The browserstack-cypress-cli module also does not include it in thei... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | JessePomerenk |
| hostname | github.com |
| expected-hostname | github.com |
| None | 9185ccfefd80c1ff2d9ddcdb0cd2becf46b5a1efbbf30741a895e4bb8de25e64 |
| turbo-cache-control | no-preview |
| go-import | github.com/browserstack/browserstack-cypress-cli git https://github.com/browserstack/browserstack-cypress-cli.git |
| octolytics-dimension-user_id | 1119453 |
| octolytics-dimension-user_login | browserstack |
| octolytics-dimension-repository_id | 242935045 |
| octolytics-dimension-repository_nwo | browserstack/browserstack-cypress-cli |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 242935045 |
| octolytics-dimension-repository_network_root_nwo | browserstack/browserstack-cypress-cli |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 06dc448a76fe4751ac1db26524aefa3aa3e889a8 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
| Server | github.com |
| Content-Type | text/html; charset=utf-8 |
| Cache-Control | max-age=0, private, must-revalidate |
Viewport: width=device-width