Skip to content

Error and warning when using init command #442

Description

@Hakier

Hello!

Version 1.11.1 was the last version that run init command without warnings and errors.
In this version when called init command it printed to the console only two lines:

[29.11.2022, 16:29:41] - info: Creating file: /projects/learn/cypress-example-kitchensink/browserstack.json
[29.11.2022, 16:29:41] - info: BrowserStack Config File created, you can now run browserstack-cypress --config-file run

Since version 1.11.2 it prints also a Warning:

(node:157652) Warning: Accessing non-existent property 'padLevels' of module exports inside circular dependency
(Use `node --trace-warnings ...` to show where the warning was created)

Since version 1.14.0 it prints also a TypeError:

/home/user/.nvm/versions/node/v18.12.1/lib/node_modules/browserstack-cypress-cli/bin/helpers/usageReporting.js:176
if(typeof bsConfig === 'object' && !utils.isUndefined(bsConfig.run_settings)) {
^

  TypeError: Cannot read properties of null (reading 'run_settings')
  at redactBsConfig (/home/user/.nvm/versions/node/v18.12.1/lib/node_modules/browserstack-cypress-cli/bin/helpers/usageReporting.js:176:66)
  at redactRecordCaps (/home/user/.nvm/versions/node/v18.12.1/lib/node_modules/browserstack-cypress-cli/bin/helpers/usageReporting.js:192:3)
  at Object.send (/home/user/.nvm/versions/node/v18.12.1/lib/node_modules/browserstack-cypress-cli/bin/helpers/usageReporting.js:208:3)
  at exports.sendUsageReport (/home/user/.nvm/versions/node/v18.12.1/lib/node_modules/browserstack-cypress-cli/bin/helpers/utils.js:137:18)
  at exports.configCreated (/home/user/.nvm/versions/node/v18.12.1/lib/node_modules/browserstack-cypress-cli/bin/helpers/utils.js:507:8)
  at /home/user/.nvm/versions/node/v18.12.1/lib/node_modules/browserstack-cypress-cli/bin/helpers/fileHelpers.js:14:11
  at /home/user/.nvm/versions/node/v18.12.1/lib/node_modules/browserstack-cypress-cli/node_modules/graceful-fs/graceful-fs.js:143:16
  at /home/user/.nvm/versions/node/v18.12.1/lib/node_modules/browserstack-cypress-cli/node_modules/graceful-fs/graceful-fs.js:61:14
  at FSReqCallback.oncomplete (node:fs:197:23)

Tested on node: v12.22.12, v14.17.4, v18.12.1

BTW. Only one line differs in generated config (1.11.1 vs 1.19.1):
image

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions