digitallyinduced / digitallyinduced/thin-backend

Vercel `npm run build` errors on types

Open
#29 4 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
1.2k
Forks
30
PR merge metrics
No merged PRs in 30d

Description

```
[15:41:37.616] Cloning github.com/jokull/vercel-thin-test (Branch: main, Commit: c20d830)
[15:41:37.962] Cloning completed: 345.359ms
[15:41:38.352] Installing build runtime...
[15:41:41.831] Build runtime installed: 3.478s
[15:41:42.635] Looking up build cache...
[15:41:46.138] Build cache downloaded [50.11 MB]: 3140.970ms
[15:41:46.420] Detected `package-lock.json` generated by npm 7...
[15:41:52.284]
[15:41:52.284] added 39 packages, removed 227 packages, and changed 5 packages in 6s
[15:41:52.285]
[15:41:52.285] 76 packages are looking for funding
[15:41:52.285] run `npm fund` for details
[15:41:52.302] Detected Next.js version: 12.1.5
[15:41:52.306] Detected `package-lock.json` generated by npm 7...
[15:41:52.306] Running "npm run build"
[15:41:52.698]
[15:41:52.698] > ihp-backend-next-typescript-starter@0.1.0 build
[15:41:52.698] > next build
[15:41:52.698]
[15:41:53.303] info - Loaded env from /vercel/path0/.env
[15:41:53.568] info - Checking validity of types...
[15:41:56.940] Failed to compile.
[15:41:56.940]
[15:41:56.941] ./pages/index.tsx:97:26
[15:41:56.941] Type error: Argument of type '"posts"' is not assignable to parameter of type 'TableName'.
[15:41:56.941]
[15:41:56.941]   95 | 
[15:41:56.941]   96 |  onSubmit: async (fieldValues) => {
[15:41:56.941] > 97 |  await createRecord("posts", {
[15:41:56.941]   |  ^
[15:41:56.942]   98 |  title: fieldValues.title,
[15:41:56.942]   99 |  content: fieldValues.content,
[15:41:56.942]   100 |  });
[15:41:56.965] Error: Command "npm run build" exited with 1
```

My packages.json:

```
{
"name": "ihp-backend-next-typescript-starter",
"version": "0.1.0",
"private": true,
"scripts": {
"dev": "next dev",
"build": "next build",
"start": "next start",
"lint": "next lint"
},
"dependencies": {
"@heroicons/react": "^1.0.6",
"@shopify/react-form": "^1.1.19",
"next": "^12.1.5",
"react": "17.0.2",
"react-dom": "17.0.2",
"thin-backend": "*"
},
"devDependencies": {
"@tailwindcss/forms": "^0.5.0",
"@types/node": "^17.0.29",
"@types/react": "17.0.37",
"@types/thin-backend": "https://thin.dev/ShowTypescriptDeclarationFile?typescriptDeclarationFileId=d7540d89-7a5e-468a-82d2-be573b79dab9&accessToken=KJAkmygLwbMGCrLidrTAAJMZIBNefmoF",
"autoprefixer": "^10.4.5",
"eslint": "8.5.0",
"eslint-config-next": "12.0.7",
"postcss": "^8.4.12",
"tailwindcss": "^3.0.24",
"typescript": "4.5.4"
}
}
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.