New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
core-js modules not found when using load all stories glob #7003
Comments
Angular 8 dropped core-js as a dependency. You said
I did a fresh setup myself and it has worked - have you tried to follow the manual steps or have you used the CLI? Can you try a fresh installation with
Or try https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#angular-7 but this was originally a fix for Angular 7 with core-js 3 |
Okay, ran those... new project created, storybook installed just fine.
So I ran Now I'm back to where I was before:
|
+1 same error |
I just released https://github.com/storybookjs/storybook/releases/tag/v5.1.4 containing PR #7051 that's related to this issue. Can someone check to see if it's fixed in the new version? 🙏 |
Before I had this error with: "@storybook/angular": "5.1.3" and "core-js": "2.6.5", In both cases if I use "core-js": "3.0.1" storybook works 🎉 |
This is fixed for me with storybook 5.1.5 |
Describe the bug
Multiple Can't resolve 'core-js/modules/' errors, but only when using the .storybook/config.js to load all stories matching a glob method.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Storybook to load just like it does if I specify individual file import without trying to match /.stories.ts$/
Screenshots
Code snippets
.storybook/config.js:
`import { configure } from '@storybook/angular';
import requireContext from 'require-context.macro';
const req = requireContext('../src/app/modules', true, /.stories.ts$/);
function loadStories() {
req.keys().forEach(filename => req(filename));
}
configure(loadStories, module);`
package.json:
{ "name": "one-equality", "version": "0.0.0", "scripts": { "ng": "ng", "start": "ng serve", "build": "ng build", "test": "ng test", "lint": "ng lint", "e2e": "ng e2e", "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/flex-layout": "^8.0.0-beta.26", "@angular/forms": "~8.0.0", "@angular/material": "^8.0.0", "@angular/platform-browser": "~8.0.0", "@angular/platform-browser-dynamic": "~8.0.0", "@angular/router": "~8.0.0", "core-js": "^2.5.4", "hammerjs": "^2.0.8", "require-context.macro": "^1.0.4", "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.0", "@angular/compiler-cli": "~8.0.0", "@angular/language-service": "~8.0.0", "@babel/core": "^7.4.5", "@storybook/angular": "^5.1.3", "@types/jasmine": "~2.8.8", "@types/jasminewd2": "~2.0.3", "@types/node": "~8.9.4", "babel-loader": "^8.0.6", "codelyzer": "~4.5.0", "jasmine-core": "~2.99.1", "jasmine-spec-reporter": "~4.2.1", "karma": "~4.0.0", "karma-chrome-launcher": "~2.2.0", "karma-coverage-istanbul-reporter": "~2.0.1", "karma-jasmine": "~1.1.2", "karma-jasmine-html-reporter": "^0.2.2", "protractor": "~5.4.0", "ts-node": "~7.0.0", "tslint": "~5.11.0", "typescript": "~3.4.5" } }
System:
Storybook - ^5.1.3
Angular - ~8.0.0
core-js - ^2.5.4
Additional context
I have tried upgrading core-js to 3, to various specific versions of 2... nothing seems to work. As long as I use the load all stories method, I get those errors.
The text was updated successfully, but these errors were encountered: