Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NotionCompatAPI missing declaration file #510

Open
pnodet opened this issue Jul 21, 2023 · 1 comment
Open

NotionCompatAPI missing declaration file #510

pnodet opened this issue Jul 21, 2023 · 1 comment

Comments

@pnodet
Copy link

pnodet commented Jul 21, 2023

Hi!

When using the NotionCompatAPI from 'notion-compat' currently version "6.16.0" the declaration file is not emitted or present in the dist folder.

@janek
Copy link

janek commented Mar 25, 2024

I'm having the same problem, or at least so I think:

Type error: Could not find a declaration file for module 'notion-compat'. '/vercel/path0/node_modules/notion-compat/build/index.js' implicitly has an 'any' type.
  Try `npm i --save-dev @types/notion-compat` if it exists or add a new declaration (.d.ts) file containing `declare module 'notion-compat';`
  2 | import * as React from "react"
  3 | import NotionPage from "../ui/notion-page"
> 4 | import { NotionCompatAPI } from "notion-compat"
    |                                 ^
  5 | import getProjectsFromNotion from "../lib/getProjectsFromNotion"
  6 |
  7 | // Next.js setting: Give a 404 for any slug that's not on the generateStaticParams() list
error: script "build" exited with code 1
Error: Command "bun run build" exited with 1

Workaround that worked for me:

Screenshot 2024-03-25 at 13 58 02

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants