DEV Community

tech talents
tech talents

Posted on

Getting error , npm run build please help

When I try to run npm run build command I am getting this error. Can someone kindly help me please. The code working perfectly in my localhost. I am unable to build it though. Kindly help me. Thanks in advance.


F:\prop>npm run build

..matics-next@1.0.0 build
next build

▲ Next.js 14.2.31

  • Environments: .env

Creating an optimized production build ...
✓ Compiled successfully
Linting and checking validity of types ...Failed to compile.

*./app/blog/articles/[slug]/page.tsx:3:26
Type error: Cannot find module '@apps/types' or its corresponding type declarations.
*

1 | import { createClient } from "contentful";
2 | import { documentToReactComponents } from '@contentful/rich-text-react-renderer';
*> 3 | import { BlogItem } from "@apps/types";
*
| ^
4 | import Link from "next/link";
5 |
6 | const client = createClient({
*Next.js build worker exited with code: 1 and signal: null
*
Linting and checking validity of types .


Here is my package.json, page.tsx, tsconfig.json, folder structure, etc..



Top comments (0)