Parcel doesn't build when i use stitches.ScaleValue<'space'> type. #8980
Answered
by
mischnic
binishkaspar
asked this question in
Q&A
-
I have a simple react js project. Everything works as expected. But the build throws Here is part of package.json file {
"source": "src/lib.ts",
"main": "dist/main.js",
"module": "dist/module.js",
"types": "dist/types.d.ts",
"type": "module",
"targets": {
"main": false
},
"dependencies": {
"@stitches/react": "^1.2.8",
"@testing-library/jest-dom": "^5.14.1",
"@testing-library/react": "^13.0.0",
"@testing-library/user-event": "^13.2.1",
"@types/jest": "^27.0.1",
"@types/node": "^16.7.13",
"@types/react": "^18.0.0",
"@types/react-dom": "^18.0.0",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-scripts": "5.0.1",
"typescript": "^4.4.2",
"web-vitals": "^2.1.0"
},
"devDependencies": {
"@parcel/packager-ts": "2.8.3",
"@parcel/transformer-typescript-tsc": "^2.8.3",
"@parcel/transformer-typescript-types": "2.8.3",
"parcel": "^2.8.3"
}
} here is lib.ts file import './stitches.config';
export {
SomeView,
} from './comp/SomeView';
export type {
SomeViewProps,
} from './comp/SomeView'; here is import * as stitches from '@stitches/react';
import { createStitches } from '@stitches/react';
export const {
styled,
css,
globalCss,
keyframes,
getCssText,
theme,
createTheme,
config,
} = createStitches({
theme: {
fontWeights: {},
lineHeights: {},
},
media: {
bp1: '(min-width: 480px)',
},
utils: {
marginX: (value: stitches.ScaleValue<'space'>) => ({
marginLeft: value,
marginRight: value,
}),
},
}); But the above code works if I remove Am I missing something here? |
Beta Was this translation helpful? Give feedback.
Answered by
mischnic
May 2, 2023
Replies: 1 comment 3 replies
-
The error message will be improved by #8914 in the next release. If you're on Linux/macOS, try running |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Seems like this is a known issue with that library? https://stackoverflow.com/questions/73962388/typescript-styled-component-the-type-of-this-node-cannot-be-serialized-because