Skip to content
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

[Bug]: 7.0.5 - Warnings when building Angular storybooks #22115

Closed
nstuyvesant opened this issue Apr 16, 2023 · 3 comments
Closed

[Bug]: 7.0.5 - Warnings when building Angular storybooks #22115

nstuyvesant opened this issue Apr 16, 2023 · 3 comments

Comments

@nstuyvesant
Copy link

Describe the bug

When building a storybook, I am getting these warnings...

WARN export 'default' (imported as 'previewAnnotations') was not found in '/Users/nates/dev/carbon-charts/packages/charts-angular/node_modules/@storybook/addon-essentials/dist/backgrounds/preview.mjs' (possible exports: decorators, globals, parameters)
WARN export 'default' (imported as 'previewAnnotations') was not found in '/Users/nates/dev/carbon-charts/packages/charts-angular/node_modules/@storybook/addon-essentials/dist/docs/preview.mjs' (possible exports: parameters)
WARN export 'default' (imported as 'previewAnnotations') was not found in '/Users/nates/dev/carbon-charts/packages/charts-angular/node_modules/@storybook/addon-essentials/dist/highlight/preview.mjs' (possible exports: highlightObject, highlightStyle)
WARN export 'default' (imported as 'previewAnnotations') was not found in '/Users/nates/dev/carbon-charts/packages/charts-angular/node_modules/@storybook/addon-essentials/dist/measure/preview.mjs' (possible exports: decorators, globals)
WARN export 'default' (imported as 'previewAnnotations') was not found in '/Users/nates/dev/carbon-charts/packages/charts-angular/node_modules/@storybook/addon-essentials/dist/outline/preview.mjs' (possible exports: decorators, globals)
WARN export 'default' (imported as 'previewAnnotations') was not found in '/Users/nates/dev/carbon-charts/packages/charts-angular/node_modules/@storybook/angular/dist/client/config.js' (possible exports: __esModule, applyDecorators, parameters, render, renderToCanvas)
WARN export 'default' (imported as 'previewAnnotations') was not found in '/Users/nates/dev/carbon-charts/packages/charts-angular/node_modules/@storybook/angular/dist/client/docs/config.js' (possible exports: __esModule, argTypesEnhancers, decorators, parameters)

To Reproduce

Build an Angular storybook that has a preview.ts file.

System

Environment Info:

  System:
    OS: macOS 13.3.1
    CPU: (10) arm64 Apple M1 Pro
  Binaries:
    Node: 18.16.0 - /opt/homebrew/bin/node
    Yarn: 3.5.0 - /opt/homebrew/bin/yarn
    npm: 9.6.4 - /opt/homebrew/bin/npm
  Browsers:
    Chrome: 112.0.5615.49
    Firefox: 111.0.1
    Safari: 16.4
  npmPackages:
    @storybook/addon-essentials: ^7.0.5 => 7.0.5 
    @storybook/addon-interactions: ^7.0.5 => 7.0.5 
    @storybook/addon-links: ^7.0.5 => 7.0.5 
    @storybook/angular: ^7.0.5 => 7.0.5 
    @storybook/blocks: ^7.0.5 => 7.0.5 
    @storybook/manager-api: ^7.0.5 => 7.0.5 
    @storybook/testing-library: ^0.1.0 => 0.1.0 
    @storybook/theming: ^7.0.5 => 7.0.5

Additional context

No response

@shilman
Copy link
Member

shilman commented Apr 17, 2023

@nstuyvesant what's the content of your preview.ts file?

@nstuyvesant
Copy link
Author

Here are the current contents for that package in the monorepo. Thanks for looking into this.

import type { Preview } from '@storybook/angular'
import { themes } from '@storybook/theming'
import '@carbon/charts/demo/styles.css'

const preview: Preview = {
	parameters: {
		actions: { argTypesRegex: '^on[A-Z].*' },
		controls: {
			matchers: {
				color: /(background|color)$/i,
				date: /Date$/
			}
		},
		docs: {
			theme: themes.dark
		},
		backgrounds: { // --cds-background
			default: 'g100',
			values: [
				{
					name: 'g100',
					value: '#161616'
				},
				{
					name: 'g90',
					value: '#262626'
				},
				{
					name: 'g10',
					value: '#f4f4f4'
				},
				{
					name: 'white',
					value: '#fff'
				}
			]
		}
	}
}

export default preview

@valentinpalkovic
Copy link
Contributor

Duplicate of #21696

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

No branches or pull requests

3 participants