novuhq / novu

Open-Source Notification Platform. Embeddable Notification Center, E-mail, Push and Slack Integrations.
https://novu.co
Other
34.61k stars 3.54k forks source link

🐛 Bug Report: Cannot find module '@novu/framework/next' or its corresponding type declarations.ts #6332

Open patbeqo opened 1 month ago

patbeqo commented 1 month ago

📜 Description

Cannot find module '@novu/framework/next' or its corresponding type declarations.ts

👟 Reproduction steps

import { serve } from "@novu/framework/next";

"@novu/framework": "2.0.0-canary.5"

👍 Expected behavior

Typescript support

👎 Actual Behavior with Screenshots

Unable to import from '@novu/framework/next'

Novu version

2.0.0-canary.5

npm version

10.5.0

node version

v18.20.1

📃 Provide any additional context for the Bug.

No response

👀 Have you spent some time to check if this bug has been raised before?

🏢 Have you read the Contributing Guidelines?

Are you willing to submit PR?

Yes I am willing to submit a PR!

linear[bot] commented 1 month ago

NV-4215 🐛 Bug Report: Cannot find module '@novu/framework/next' or its corresponding type declarations.ts

brunocamboim commented 1 month ago

Did you find any solutions? I have the same problem, but with @novu/framework/express

patbeqo commented 1 month ago

@brunocamboim I've disabled the type checking for now...

// @ts-ignore
import { serve } from "@novu/framework/next";
paulwer commented 1 week ago

dont know, if this is helpfull, but in our case this was related to using commonjs modules, so we used require as an workaround and it works with our setup of express.

Maybe a comminjs build of the lib would be suiteable.

SokratisVidros commented 3 days ago

@patbeqo which Next.js version are you using? Can you please send us a small reproduction?