You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jan 23, 2024. It is now read-only.
I was attempting to reproduce a bug using npx sb@next repro, and added jest, @storybook/testing-library, @storybook/testing-react, etc, and am now getting jest errors because of this package:
Jest encountered an unexpected token
...
Details:
/Users/ianvs/code/experiments/issue-16677/node_modules/@storybook/testing-library/dist/index.js:16
import { once } from '@storybook/client-logger';
^^^^^^
SyntaxError: Cannot use import statement outside a module
1 | import React from 'react';
2 | import { ComponentStory, ComponentMeta } from '@storybook/react';
> 3 | import {userEvent, screen} from '@storybook/testing-library';
| ^
4 |
5 | import { Button } from './Button';
6 |
I believe this is because the tsconfig for this project specifies es6 modules as the target output, but module is not specified in the package.json, cjs files aren't also built, and the package.json does not list "type": "module".
The text was updated successfully, but these errors were encountered:
Describe the bug
I was attempting to reproduce a bug using
npx sb@next repro
, and added jest, @storybook/testing-library, @storybook/testing-react, etc, and am now getting jest errors because of this package:Steps to reproduce the behavior
IanVS/storybook-issue-16677@8549685
yarn
thenyarn test
Environment
Additional context
I believe this is because the tsconfig for this project specifies es6 modules as the target output, but
module
is not specified in the package.json, cjs files aren't also built, and the package.json does not list"type": "module"
.The text was updated successfully, but these errors were encountered: