4lejandrito / next-plausible

Simple integration for https://nextjs.org and https://plausible.io analytics
https://next-plausible.vercel.app
MIT License
603 stars 33 forks source link

upgrading nextjs to 13.5.5 results in warnings on `next build` #104

Closed jrhizor closed 1 year ago

jrhizor commented 1 year ago

When running next build on 13.5.3 I don't see any warnings, but after upgrading to 13.5.5 I see:

 ⚠ Invalid next.config.js options detected:
 ⚠     "env.next_plausible_trailingSlash" is missing, expected string
 ⚠     "env.next_plausible_basePath" is missing, expected string
 ⚠     "env.next_plausible_customDomain" is missing, expected string
 ⚠     "env.next_plausible_scriptName" is missing, expected string
 ⚠     "env.next_plausible_subdirectory" is missing, expected string
 ⚠ See more info here: https://nextjs.org/docs/messages/invalid-next-config

I'm using a pretty basic next.config.js:

const nextConfig = {
  reactStrictMode: true
};

module.exports = nextConfig;

 const { withPlausibleProxy } = require('next-plausible');

module.exports = withPlausibleProxy()(module.exports);

This is with next-plausible@3.11.1.

I don't think this breaks anything, it's just a bit noisy in build logs.

4lejandrito commented 1 year ago

I saw this a few days ago... I will try to have the fix during the next few days.

Thanks for reporting!

niclas-j commented 1 year ago

I saw this a few days ago... I will try to have the fix during the next few days.

Thanks for reporting!

Having the same issue going from 13.5.4 to 13.5.5, thank you for looking into it! :)

4lejandrito commented 1 year ago

Published as next-plausible@3.11.2.

jrhizor commented 1 year ago

Thanks!

kachkaev commented 1 year ago

Would it be possible to add a tag and a CHANGELOG entry?

I saw an update via Renovate bot but it took a bit of time to figure out what it was.

Thanks for this lib @4lejandrito 🙌

4lejandrito commented 1 year ago

Would it be possible to add a tag and a CHANGELOG entry?

* https://github.com/4lejandrito/next-plausible/tags

* https://github.com/4lejandrito/next-plausible/blob/master/CHANGELOG.md

I saw an update via Renovate bot but it took a bit of time to figure out what it was.

Thanks for this lib @4lejandrito 🙌

https://github.com/4lejandrito/next-plausible/commit/4482cb2eefba20737cd541a13b5fc0dd7dd4f0e7.