@storybook/addon-a11y raises an error related to Promise polyfill
See original GitHub issueDescribe 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
Issue Analytics
- State:
- Created 4 years ago
- Reactions:5
- Comments:19 (2 by maintainers)
Top Results From Across the Web
promise-polyfill - npm
Start using promise-polyfill in your project by running `npm i ... There are 973 other projects in the npm registry using promise-polyfill.
Read more >How to Polyfill Promise in Visual Studio 2017 Office Add-in ...
I have require('core-js'); declared at the top of FunctionFile.ts, but the error persists. I followed the guidance provided in this question : ...
Read more >JavaScript: Polyfills for Promise | by D DEV
If all the promises are rejected, it would reject the Promise, or successfully send an error. The definition of Promise.any is rather simple....
Read more >Promise(executor) - Mithril.js
Documentation on Mithril.js' Promise polyfill. ... If this function throws, nextPromise is rejected with the error as its reason.
Read more >Promise Error Handling - JavaScript Tutorial
In this tutorial, you will learn about promise error handling that shows you how ... When you raise an exception outside the promise,...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
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 install
the issue would occur, but if I usedyarn install
the issue would not occur.