storybook: @storybook/addon-a11y raises an error related to Promise polyfill
Describe the bug After updating to @angular~8.0.0 and @storybook/angular~5.1.3 started to get unhandled promise rejections.
To Reproduce Steps to reproduce the behavior:
- Update @angular to version 8.0.0 using CLI tool
- Update storybook and all related addons to 5.1.3
- The addon-a11y should be imported in the addons.js
- Run storybook
- None of components are displayed on canvas
- In the console an unhandled Error is displayed related to Zone.js
Expected behavior The addons should try reuse the version of core-js that is installed.
Screenshots

Code snippets package.json:
{
"name": "web-app-prototype",
"version": "0.0.0",
"scripts": {
"ng": "ng",
"start": "ng serve",
"start:mock": "ng serve --configuration=mock",
"build": "ng build",
"test": "jest",
"test:watch": "jest --watch",
"test:ci": "jest --runInBand",
"lint": "ng lint",
"e2e": "ng e2e",
"start:local-prod": "ng build --prod && http-server -p 8000 -c-1 dist/web-app-prototype",
"storybook": "start-storybook"
},
"private": true,
"dependencies": {
"@angular/animations": "~8.0.0",
"@angular/cdk": "~8.0.0",
"@angular/common": "~8.0.0",
"@angular/compiler": "~8.0.0",
"@angular/core": "~8.0.0",
"@angular/forms": "~8.0.0",
"@angular/material": "^8.0.0",
"@angular/platform-browser": "~8.0.0",
"@angular/platform-browser-dynamic": "~8.0.0",
"@angular/pwa": "^0.12.4",
"@angular/router": "~8.0.0",
"@angular/service-worker": "~8.0.0",
"@ngrx/effects": "^7.4.0",
"@ngrx/entity": "^7.4.0",
"@ngrx/store": "^7.4.0",
"@ngrx/store-devtools": "^7.4.0",
"core-js": "^3.1.3",
"hammerjs": "^2.0.8",
"rxjs": "~6.5.2",
"tslib": "^1.9.0",
"zone.js": "~0.9.1"
},
"devDependencies": {
"@angular-devkit/build-angular": "~0.800.0",
"@angular/cli": "~8.0.2",
"@angular/compiler-cli": "~8.0.0",
"@angular/language-service": "~8.0.0",
"@babel/core": "^7.4.4",
"@ngrx/schematics": "^7.4.0",
"@status/codes": "^1.2.0",
"@storybook/addon-a11y": "^5.1.3",
"@storybook/addon-actions": "^5.1.3",
"@storybook/addon-console": "^1.1.0",
"@storybook/addon-events": "^5.1.3",
"@storybook/addon-jest": "^5.1.3",
"@storybook/addon-knobs": "^5.1.3",
"@storybook/addon-links": "^5.1.3",
"@storybook/addon-notes": "^5.1.3",
"@storybook/addon-storysource": "^5.1.3",
"@storybook/addon-viewport": "^5.1.3",
"@storybook/angular": "^5.1.3",
"@types/jasmine": "~2.8.8",
"@types/jasminewd2": "~2.0.6",
"@types/jest": "^24.0.13",
"@types/node": "~12.0.7",
"babel-loader": "^8.0.5",
"codelyzer": "^5.1.0",
"jasmine-core": "~2.99.1",
"jasmine-spec-reporter": "~4.2.1",
"jest": "^24.8.0",
"jest-preset-angular": "^7.1.1",
"jws": "^3.2.2",
"protractor": "~5.4.2",
"ts-node": "~7.0.0",
"tslint": "~5.11.0",
"typescript": "~3.4.5"
},
"jest": {
"preset": "jest-preset-angular",
"setupTestFrameworkScriptFile": "<rootDir>/src/setupJest.ts"
}
}
System:
- OS: MacOS 10.14.5
- Device: MacBook Pro 13 2017
- Browser: chrome
- Framework: angular
- Addons: @storybook/addon-a11y - ^5.1.3
- Version: 5.1.3
Additional context When I remove all the imports of the addon-a11y the issue disappears
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Reactions: 5
- Comments: 20 (3 by maintainers)
I cloned the example repo (https://github.com/brenzy/storybook-zone-issue) and updated storybook
It updated to 5.2.4 and it seems to work. Tested with npm 6.9.0 and node 10.16.0.
However, I still have the issue described in https://github.com/storybookjs/storybook/issues/7318 on my project 😕
I added a repo to reproduce this issue at: https://github.com/brenzy/storybook-zone-issue While attempting to recreate the issue, I noticed that if I used
npm installthe issue would occur, but if I usedyarn installthe issue would not occur.