Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

325
Visualizações
Next.js project build error: Entry point for implicit type library 'build'

I am trying to build nextjs project and getting this error:

Type error: Cannot find type definition file for 'build'.
  The file is in the program because:
    Entry point for implicit type library 'build'

how can I build without this error?

This is how package.json looks:

{
  "name": "frontend",
  "version": "0.1.0",
  "private": true,
  "license": "fa",
  "scripts": {
    "dev": "next dev",
    "build": "next build",
    "start": "next start",
    "lint": "next lint"
  },
  "dependencies": {
    "@ckeditor/ckeditor5-alignment": "^33.0.0",
    "@ckeditor/ckeditor5-build-classic": "^33.0.0",
    "@ckeditor/ckeditor5-code-block": "^33.0.0",
    "@ckeditor/ckeditor5-react": "^4.0.0",
    "@hookform/resolvers": "^2.8.8",
    "@types/": "ckeditor/ckeditor5-alignment",
    "axios": "^0.26.0",
    "dompurify": "^2.3.6",
    "highlight.js": "^11.5.0",
    "isomorphic-dompurify": "^0.18.0",
    "mobx": "^6.4.2",
    "mobx-react-lite": "^3.3.0",
    "next": "^12.1.5",
    "nextjs-progressbar": "^0.0.14",
    "react": "^18.0.0",
    "react-dom": "^18.0.0",
    "react-hook-form": "^7.27.1",
    "sass": "^1.49.9",
    "yup": "^0.32.11"
  },
  "devDependencies": {
    "@types/node": "^17.0.25",
    "@types/react": "^18.0.6",
    "eslint": "8.10.0",
    "eslint-config-next": "12.1.0",
    "typescript": "^4.6.3"
  }
}

I am trying to build using yarn build command

Why am I getting this error and how can I get rid of it?

about 4 years ago · Santiago Trujillo
1 Respostas
Responde à pergunta

0

The issue is caused by this line in your package.json:

"@types/": "ckeditor/ckeditor5-alignment",

Looks like yarn add gone wrong. Uninstall that, remove it from your package.json, and you should be good to go :)

This issue occurs when you have subdirectories of a typeRoots directory (in this case node_modules/@types) that do not contain index.d.ts.

I agree, not a very clear error message. For more info, Microsoft/TypeScript #27956 discusses this same problem.

about 4 years ago · Santiago Trujillo Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda