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

Types are incompatible with Next@11 #25

Closed
JamiesWhiteShirt opened this issue Oct 20, 2021 · 1 comment
Closed

Types are incompatible with Next@11 #25

JamiesWhiteShirt opened this issue Oct 20, 2021 · 1 comment

Comments

@JamiesWhiteShirt
Copy link

Using [email protected], [email protected] and [email protected], the following happens during build:

./node_modules/next-plausible/dist/index.d.ts:2:28
Type error: Cannot find module 'next/dist/next-server/server/config-shared' or its corresponding type declarations.

  1 | import React, { ReactNode } from 'react';
> 2 | import { NextConfig } from 'next/dist/next-server/server/config-shared';
    |                            ^
  3 | declare type NextPlausibleProxyOptions = {
  4 |     subdirectory?: string;
  5 |     scriptName?: string;

This is caused by these changes to Next.js: vercel/next.js#26756

With next@11, the above import can simply be replaced with import { NextConfig } from 'next'. AFAIK that would only be compatible with Next@11, so the peer dependency would have to be narrowed to ^11.0.0.

@4lejandrito
Copy link
Owner

Hi @JamiesWhiteShirt, thank for reporting this!

I've fixed it in [email protected]. Please reopen if you still have problems.

Important: People using a version of next lower than 11.1.0 will have to stick to next-plausible@2 from now on.

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