storybook-amp icon indicating copy to clipboard operation
storybook-amp copied to clipboard

Where should `@emotion/styled` and `@emotion/react` comes from ?

Open JulienKode opened this issue 3 years ago • 1 comments

Thanks for creating this nice library

I have a question regarding the import of @emotion/styled inside the components https://github.com/onwidget/storybook-amp/blob/a34b6c0e39c22d636b7f37528303cef1f016e486/src/components/PanelContent.js#L2

Where is it supposed to comes from I do not see it as peerDeps or deps ?

  • https://github.com/onwidget/storybook-amp/blob/a34b6c0e39c22d636b7f37528303cef1f016e486/package.json#L46
  • https://github.com/onwidget/storybook-amp/blob/a34b6c0e39c22d636b7f37528303cef1f016e486/package.json#L75

It creates the following error on my side:

Module not found: Error: Can't resolve '@emotion/styled' in '/Users/XXX/node_modules/storybook-amp/dist/components'
 @ /Users/XXX/node_modules/storybook-amp/dist/components/PanelContent.js 10:37-63

When I add @emotion/styled and @emotion/react as a devDeps it works on my side

JulienKode avatar Oct 17 '22 08:10 JulienKode

Created https://github.com/onwidget/storybook-amp/pull/9 in case we need to add it

JulienKode avatar Oct 17 '22 08:10 JulienKode

Resolved with: https://github.com/onwidget/storybook-amp/commit/9f8108435ed9a566a9da403d607d5db686dfb0ab

prototypa avatar Jun 17 '23 23:06 prototypa