Separate version of Next.js installed when next-piwik-pro is installed
Closed this issue · 1 comments
wojtekmaj commented
Steps to reproduce:
- Install Next.js
- Install @piwikpro/next-piwik-pro
Expected result:
@piwikpro/next-piwik-pro uses existing copy of Next.js
Actual result:
next-piwik-pro installs its own version of Next.js 12
Suggested fix:
It appears that the only reason Next.js is a dependency of @piwikpro/next-piwik-pro is this line:
next-piwik-pro/src/core/index.tsx
Line 2 in 6979862
Given that:
- This package is intended to be used with Next.js,
- Literally everyone using this package will have Next.js already installed,
- Next.js 13 did not introduce any breaking changes regarding next/script,
I believe it's safe to:
- Move
next
topeerDependencies
, - Loosen version requirements to
^11.0.0 || ^12.0.0 || ^13.0.0
, every version of Next.js supporting next/script according to its Version History.
Workaround:
With Yarn:
"resolutions": {
"@piwikpro/next-piwik-pro/next": "<your_package_version>"
},
lysy-vlc commented
Already resolved. Please check the newest version