René's URL Explorer Experiment


Title: ESM issues · Issue #835 · browserstack/browserstack-cypress-cli · GitHub

Open Graph Title: ESM issues · Issue #835 · browserstack/browserstack-cypress-cli

X Title: ESM issues · Issue #835 · browserstack/browserstack-cypress-cli

Description: I'm trying to run Cypress tests on Browserstack, but keep getting this. I'm on Cypress 13.6.4 and browserstack-cypress-cli@1.31.0 Not sure how to fix this ESM/CJS issue. Here's my cypress.config.ts import task from "@cypress/code-coverag...

Open Graph Description: I'm trying to run Cypress tests on Browserstack, but keep getting this. I'm on Cypress 13.6.4 and browserstack-cypress-cli@1.31.0 Not sure how to fix this ESM/CJS issue. Here's my cypress.config.ts...

X Description: I'm trying to run Cypress tests on Browserstack, but keep getting this. I'm on Cypress 13.6.4 and browserstack-cypress-cli@1.31.0 Not sure how to fix this ESM/CJS issue. Here's my cypre...

Opengraph URL: https://github.com/browserstack/browserstack-cypress-cli/issues/835

X: @github

direct link

Domain: github.com

IPv4 address: 140.82.114.3


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"ESM issues","articleBody":"I'm trying to run Cypress tests on Browserstack, but keep getting this. I'm on Cypress 13.6.4 and `browserstack-cypress-cli@1.31.0`\r\n\r\nNot sure how to fix this ESM/CJS issue. Here's my `cypress.config.ts`\r\n\r\n```\r\nimport task from \"@cypress/code-coverage/task\";\r\nimport { allureCypress } from \"allure-cypress/reporter\";\r\nimport { defineConfig } from \"cypress\";\r\nimport cypressSplit from \"cypress-split\";\r\n\r\nexport default defineConfig({\r\n  e2e: {\r\n    specPattern: \"cypress/e2e/**\",\r\n    supportFile: \"cypress/support/index.js\",\r\n    projectId: \"test\",\r\n    video: true,\r\n    chromeWebSecurity: false,\r\n    reporter: \"cypress-multi-reporters\",\r\n    screenshotsFolder: \"./cypress/report/mochawesome-report/assets/screenshots\",\r\n    reporterOptions: {\r\n      configFile: \"reporter-config.json\"\r\n    },\r\n    numTestsKeptInMemory: 0,\r\n    retries: {\r\n      runMode: 1,\r\n      openMode: 0\r\n    },\r\n    viewportWidth: 1920,\r\n    viewportHeight: 1920,\r\n    defaultCommandTimeout: 40000,\r\n    requestTimeout: 30000,\r\n    pageLoadTimeout: 40000,\r\n    setupNodeEvents(on, config) {\r\n      task(on, config);\r\n\r\n      cypressSplit(on, config);\r\n      // allureWriter(on, config);\r\n      allureCypress(on, {\r\n        resultsDir: \"./allure-results\"});\r\n      on(\"before:browser:launch\", (browser, launchOptions) => {\r\n        launchOptions.args.push(\"--another-arg\");\r\n        if (browser.family === \"chromium\" && browser.name !== \"electron\") {\r\n          launchOptions.args.push(\"--disable-dev-shm-usage\");\r\n        }\r\n        return launchOptions;\r\n      });\r\n      return config;\r\n    }\r\n  }\r\n});\r\n```\r\n\r\n```\r\n/Users/pcanella/.nvm/versions/node/v18.19.0/lib/node_modules/browserstack-cypress-cli/bin/helpers/requireModule.js:7\r\nconst mod = require(moduleName)\r\n            ^\r\n\r\nError [ERR_REQUIRE_ESM]: require() of ES Module /Users/pcanella/gitrepo/feecalculatorfe/tmpBstackCompiledJs/cypress.config.js from /Users/pcanella/.nvm/versions/node/v18.19.0/lib/node_modules/browserstack-cypress-cli/bin/helpers/requireModule.js not supported.\r\ncypress.config.js is treated as an ES module file as it is a .js file whose nearest parent package.json contains \"type\": \"module\" which declares all .js files in that package scope as ES modules.\r\nInstead either rename cypress.config.js to end in .cjs, change the requiring code to use dynamic import() which is available in all CommonJS modules, or change \"type\": \"module\" to \"type\": \"commonjs\" in /Users/pcanella/gitrepo/feecalculatorfe/package.json to treat all .js files as CommonJS (using .mjs for all ES modules instead).\r\n\r\n    at Object.\u003canonymous> (/Users/pcanella/.nvm/versions/node/v18.19.0/lib/node_modules/browserstack-cypress-cli/bin/helpers/requireModule.js:7:13) {\r\n  code: 'ERR_REQUIRE_ESM'\r\n}\r\n\r\n```","author":{"url":"https://github.com/pcanella","@type":"Person","name":"pcanella"},"datePublished":"2024-05-28T22:38:26Z","url":"https://github.com/browserstack/browserstack-cypress-cli/issues/835"}

react-profiling0
react-import-mapreact,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-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:3bb79a26-9f84-0510-df21-3c6a46e2aa4c
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idC534:1567FF:4F6EF0:6B5AD5:6B043D32
html-safe-nonce5c64ca3abca81e5adef0bb2f896ca85d703d827de139264e2405897ba01503ec
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDNTM0OjE1NjdGRjo0RjZFRjA6NkI1QUQ1OjZCMDQzRDMyIiwidmlzaXRvcl9pZCI6IjU0ODIxNDIwODE0MTU5MjA5NDYiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmac7b30e92681f8d84749034da2ef58a2579112fad5da800f15988144baf9f96330
hovercard-subject-tagissue:2322028486
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/browserstack/browserstack-cypress-cli/835/issue_layout
twitter:imagehttps://opengraph.githubassets.com/5997d54c5c5f86a565af63e44f85eaf00c9d55bd6e4ef74edaf50716d24be2ca/browserstack/browserstack-cypress-cli/issues/835
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/5997d54c5c5f86a565af63e44f85eaf00c9d55bd6e4ef74edaf50716d24be2ca/browserstack/browserstack-cypress-cli/issues/835
og:image:altI'm trying to run Cypress tests on Browserstack, but keep getting this. I'm on Cypress 13.6.4 and browserstack-cypress-cli@1.31.0 Not sure how to fix this ESM/CJS issue. Here's my cypress.config.ts...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamepcanella
hostnamegithub.com
expected-hostnamegithub.com
None9185ccfefd80c1ff2d9ddcdb0cd2becf46b5a1efbbf30741a895e4bb8de25e64
turbo-cache-controlno-preview
go-importgithub.com/browserstack/browserstack-cypress-cli git https://github.com/browserstack/browserstack-cypress-cli.git
octolytics-dimension-user_id1119453
octolytics-dimension-user_loginbrowserstack
octolytics-dimension-repository_id242935045
octolytics-dimension-repository_nwobrowserstack/browserstack-cypress-cli
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id242935045
octolytics-dimension-repository_network_root_nwobrowserstack/browserstack-cypress-cli
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release06dc448a76fe4751ac1db26524aefa3aa3e889a8
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/browserstack/browserstack-cypress-cli/issues/835#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fbrowserstack%2Fbrowserstack-cypress-cli%2Fissues%2F835
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fbrowserstack%2Fbrowserstack-cypress-cli%2Fissues%2F835
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=browserstack%2Fbrowserstack-cypress-cli
Reloadhttps://github.com/browserstack/browserstack-cypress-cli/issues/835
Reloadhttps://github.com/browserstack/browserstack-cypress-cli/issues/835
Reloadhttps://github.com/browserstack/browserstack-cypress-cli/issues/835
browserstackhttps://github.com/browserstack
browserstack-cypress-clihttps://github.com/browserstack/browserstack-cypress-cli
Codehttps://github.com/browserstack/browserstack-cypress-cli
Issues28 (28)https://github.com/browserstack/browserstack-cypress-cli/issues
Pull requests47 (47)https://github.com/browserstack/browserstack-cypress-cli/pulls
Actionshttps://github.com/browserstack/browserstack-cypress-cli/actions
Projectshttps://github.com/browserstack/browserstack-cypress-cli/projects
Security and quality1 (1)https://github.com/browserstack/browserstack-cypress-cli/security
Insightshttps://github.com/browserstack/browserstack-cypress-cli/insights
https://github.com/browserstack/browserstack-cypress-cli
New issuehttps://github.com/login?return_to=https://github.com/browserstack/browserstack-cypress-cli/issues/835
New issuehttps://github.com/login?return_to=https://github.com/browserstack/browserstack-cypress-cli/issues/835
ESM issueshttps://github.com/browserstack/browserstack-cypress-cli/issues/835#top
https://github.com/pcanella
pcanellahttps://github.com/pcanella
on May 28, 2024https://github.com/browserstack/browserstack-cypress-cli/issues/835#issue-2322028486
https://github.com/Prakash21k
Prakash21khttps://github.com/Prakash21k
on May 31, 2024https://github.com/browserstack/browserstack-cypress-cli/issues/835#issuecomment-2141065446
sample repohttps://www.browserstack.com/docs/automate/cypress
Contact Ushttps://www.browserstack.com/contact#technical-support
https://github.com/helgenlechner
helgenlechnerhttps://github.com/helgenlechner
on Sep 5, 2024https://github.com/browserstack/browserstack-cypress-cli/issues/835#issuecomment-2330758915
@Prakash21khttps://github.com/Prakash21k
Sign up for freehttps://github.com/signup?return_to=https://github.com/browserstack/browserstack-cypress-cli/issues/835
Sign in to commenthttps://github.com/login?return_to=https://github.com/browserstack/browserstack-cypress-cli/issues/835
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Response headers:
Servergithub.com
Content-Typetext/html; charset=utf-8
Cache-Controlmax-age=0, private, must-revalidate

Viewport: width=device-width


URLs of crawlers that visited me.