system-ui / theme-ui

Build consistent, themeable React apps based on constraint-based design principles
https://theme-ui.com
MIT License
5.28k stars 675 forks source link

Type error: Property or signature expected. ` ... 157 more ...` #1920

Closed watsuyo closed 3 years ago

watsuyo commented 3 years ago

Describe the bug When deploying a Next.js project to vercel, I get the error shown in the screenshot below.

The error location is . /node_modules/@theme-ui/preset-sketchy/dist/declarations/src/index.d.ts. For some reason, the ... 157 more ... is omitted.

package.js ```json "dependencies": { "@emotion/styled": "^11.3.0", "@theme-ui/presets": "^0.11.1", "front-matter": "^4.0.2", "gray-matter": "^4.0.3", "next": "11.1.2", "next-mdx-enhanced": "^5.0.0", "next-mdx-remote": "^3.0.4", "react": "17.0.2", "react-device-detect": "^1.17.0", "react-dom": "17.0.2", "react-icons": "^4.2.0", "theme-ui": "^0.11.1" }, "devDependencies": { "@types/react": "17.0.19", "@typescript-eslint/eslint-plugin": "^4.30.0", "@typescript-eslint/parser": "^4.30.0", "babel-plugin-emotion": "^11.0.0", "eslint": "^7.32.0", "eslint-config-next": "11.1.2", "eslint-config-prettier": "^8.3.0", "eslint-plugin-react": "^7.25.1", "eslint-plugin-react-hooks": "^4.2.0", "prettier": "2.3.2", "typescript": "4.4.2" } ```

Screenshots image

watsuyo commented 3 years ago

Is there any way to solve this problem?

hasparus commented 3 years ago

Hey @watsuyo, I'll try to solve or at least research this today. For now, you can disable typechecking in Next.js builds.

Did this error occur in TypeScript 4.3?

watsuyo commented 3 years ago

Thank you for reply. I tried TypeScript 4.3 and got the same resul.

I tried ignoreBuildErrors and build passed.

hasparus commented 3 years ago

Thanks for this issue @watsuyo! It's pretty hilarious actually — we managed to break the build system.

image

This "157 more" was emitted to our typings in the build.

I'm publishing a new version with a fix, and adding a test to ensure it doesn't happen again.


On a side note, I'm sorry for advising you to ignore build errors. Turning skipLibCheck: true in tsconfig.json would be enough — you don't have to ignore your build errors, only the ones from us 😓