question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Cypress and storybook angular compatibility

See original GitHub issue

Describe the bug

When installing cypress, storybook raises errors

To Reproduce Steps to reproduce the behavior:

  1. Install storyboard for angular (following tutorial : https://storybook.js.org/basics/guide-angular/)
  2. Install cypress (npm install cypress --save-dev)
  3. launch storyboard (start-storybook -p 9001 -c .storybook)
  4. See errors

Expected behavior A clear and concise description of what you expected to happen.

Screenshots

ERROR in /home/data/sources/spvie-crm/src/node_modules/@types/jasmine/index.d.ts
ERROR in /home/data/sources/spvie-crm/src/node_modules/@types/jasmine/index.d.ts(25,18):
TS2300: Duplicate identifier 'describe'.

ERROR in /home/data/sources/spvie-crm/src/node_modules/@types/jasmine/index.d.ts
ERROR in /home/data/sources/spvie-crm/src/node_modules/@types/jasmine/index.d.ts(39,18):
TS2300: Duplicate identifier 'xdescribe'.

ERROR in /home/data/sources/spvie-crm/src/node_modules/@types/jasmine/index.d.ts
ERROR in /home/data/sources/spvie-crm/src/node_modules/@types/jasmine/index.d.ts(48,18):
TS2300: Duplicate identifier 'it'.

ERROR in /home/data/sources/spvie-crm/src/node_modules/@types/jasmine/index.d.ts
ERROR in /home/data/sources/spvie-crm/src/node_modules/@types/jasmine/index.d.ts(64,18):
TS2300: Duplicate identifier 'xit'.

ERROR in /home/data/sources/spvie-crm/src/node_modules/@types/jasminewd2/index.d.ts
ERROR in /home/data/sources/spvie-crm/src/node_modules/@types/jasminewd2/index.d.ts(10,18):
TS2300: Duplicate identifier 'it'.

ERROR in /home/data/sources/spvie-crm/src/node_modules/@types/jasminewd2/index.d.ts
ERROR in /home/data/sources/spvie-crm/src/node_modules/@types/jasminewd2/index.d.ts(12,18):
TS2300: Duplicate identifier 'xit'.

ERROR in /home/data/sources/spvie-crm/src/node_modules/@types/mocha/index.d.ts
ERROR in /home/data/sources/spvie-crm/src/node_modules/@types/mocha/index.d.ts(36,13):
TS2300: Duplicate identifier 'describe'.

ERROR in /home/data/sources/spvie-crm/src/node_modules/@types/mocha/index.d.ts
ERROR in /home/data/sources/spvie-crm/src/node_modules/@types/mocha/index.d.ts(37,13):
TS2300: Duplicate identifier 'xdescribe'.

ERROR in /home/data/sources/spvie-crm/src/node_modules/@types/mocha/index.d.ts
ERROR in /home/data/sources/spvie-crm/src/node_modules/@types/mocha/index.d.ts(42,13):
TS2300: Duplicate identifier 'it'.

System:

  • OS: ubuntu
  • Framework: angular
  • Version: 4.1.11

Thanks for your amazing works !

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:1
  • Comments:5

github_iconTop GitHub Comments

2reactions
bmarti44commented, Apr 2, 2019

This .storybook/tsconfig.json worked for me

{
  "extends": "../tsconfig.json",
  "compilerOptions": {
    "typeRoots": [],
    "types": [
      "node"
    ]
  },
  "exclude": [
    "../src/test.ts",
    "../src/**/*.spec.ts"
  ],
  "include": [
    "../src/**/*.ts"
  ]
}

The important bits seem to be the types and typeRoots, and making sure you exclude all your tests.

0reactions
stale[bot]commented, May 24, 2019

Hey there, it’s me again! I am going close this issue to help our maintainers focus on the current development roadmap instead. If the issue mentioned is still a concern, please open a new ticket and mention this old one. Cheers and thanks for using Storybook!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Cypress and storybook angular compatibility #5488 - GitHub
Describe the bug When installing cypress, storybook raises errors To Reproduce Steps to reproduce the behavior: Install storyboard for ...
Read more >
Test your Storybook. Storybook for Angular - Medium
I suppose you already have a Nx — Angular project with Storybook. Here we just talk about Cypress installation for Storybook.
Read more >
Set up Storybook for Angular Projects - Nx
The storybook-configuration generator gives the option to set up an e2e Cypress app that is configured to run against the project's Storybook instance....
Read more >
NX - Angular Storybook and Cypress Testing - William Huey
Scaffolding for Angular and Storybook with Cypress. First, use npx to localize the install of NX (v11.0.20) and Angular CLI (v11.0.20).
Read more >
Nx 14.2 - Angular v14, Storybook update, lightweight Nx and ...
We're glad that the Storybook support for Angular improved a lot over the last couple of releases s.t. we can now directly use...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found