Closed notmedia closed 5 months ago
I couldn't reproduce the issue. Have you tried removing node_modules and reinstalling again before the build?
@wingkwong Hi, yes
I'm trying to find a problem, on @nextui-org/react 2.3.4 version all going fine. On 2.3.5 I'm getting error only from date-input
@wingkwong some strange things with my monorepo, it installs @nextui-org/system 2.0.15 for all packages
But I see in most components that uses useProviderContext
package.json
has peerDep on "@nextui-org/system": ">=2.0.0"
.
This is probably incorrect because only in 2.1.2
useProviderContext
appears.
For example - https://github.com/nextui-org/nextui/blob/canary/packages/components/date-input/package.json#L37
I can see useProviderContext
has been exported here.
canary
branch locally tho.I'm on the latest version
I found the problem. One app had @nextui-org/framer-transitions": "2.0.15"
as a dependency. This broke all other packages.
But please take a look at v2.0.0 https://github.com/nextui-org/nextui/tree/v2.0.0/packages/core/system/src - there is no useProviderContext
exported, I think you should bump peer dependency to "@nextui-org/system": ">=2.1.2"
in all packages that uses this context
These package are date-input
and calendar
so you just cd to nextui/packages/components/calendar
and run pnpm build
to see the error?
No, I have monorepo with multiple frontend apps.
One of them had dependency of framer-transition
that locked system
package to 2.0.15.
That’s why all other nextui component packages used system
2.0.15 also.
I just removed framer-transition
package form this app deps and run clean install on my monorepo. After that all nextui packages got system
1.2.1
So if system
was locked to 1.2.1 in date-input
and calendar
components there would be no issues. Because it would be install correct package version for this components.
As I remember, framer-transition
has been renamed to framer-utils
since 2.3.0. Also @nextui-org/system
needs to be >=2.1.0
for the new changes (e.g. calendar, date picker) introduced in 2.3.0. Therefore, I think you just need to bump all the versions to the latest ones. It should resolve the build issue on your application.
Yes, we can close this issue.
Last try - look at packages peer deps for date-input and calendar. If it’s ok that required system can be 2.0.0 without useProviderContext do nothing. If not - bump minimum required version
NextUI Version
2.3.6
Describe the bug
On build getting an errors:
Your Example Website or App
No response
Steps to Reproduce the Bug or Issue
-
Expected behavior
-
Screenshots or Videos
No response
Operating System Version
macOS
Browser
Chrome