linaria
linaria copied to clipboard
Upgrade from linaria 4
Environment
"next": "12.2.5",
"next-linaria": "^1.0.1-beta",
"@linaria/babel-preset": "4.3.2",
"@linaria/core": "4.2.4",
"@linaria/react": "4.3.2",
"@linaria/shaker": "4.2.6",
"@linaria/webpack-loader": "4.1.10",
"webpack": "5.75.0",
"react": "18.2.0",
node --version
v16.14.2
- OS: mac 12.4
Description
I upgraded from linaria 3 to 4, plus many other libraries to overcome this issue, but to no avail.
Reproducible Demo
import { styled } from '@linaria/react';
export const StyledButton = styled.a`border-radius: 3em`;
the error:
error - ./react-components/src/atoms/Button/Button.styles.ts
SyntaxError: /Users/jjohn/www/rate.com2/react-components/src/atoms/Button/Button.styles.ts: The "from" argument must be of type string. Received undefined
3 |
4 | // @ts-ignore stuff
> 5 | export const StyledButton = styled.a`border-radius: 3em`;
I'm not sure how to reproduce this error because it's so off the wall. If I knew how to reproduce it, I'd likely be able to fix it.
I mainly would appreciate some thoughts to put me on the right track. My current hypothesis is that I need to re-work the way linaria's nextjs webpack loader is configured... I've upgraded all the other libs. My first hypothesis was that I need to be running all the current versions of things.