Closed Konard closed 5 months ago
Comment out call to useRouter
hook in /dev/node_modules/[@deep](https://t.me/deep)-foundation/store/query.js
and restart deepcase-app
.
It is suggested to replace next/router
with next/navigation
in:
https://nextjs.org/docs/messages/next-router-not-mounted https://stackoverflow.com/questions/74421327/nextrouter-was-not-mounted-next-js
But if I replace next/router
with next/navigation
it leads to the next error:
[0] Error: invariant expected app router to be mounted
Looks like solution should be done here: https://github.com/deep-foundation/store/blob/main/query.tsx#L24
This problem slows my efficiency
Make sure no packages (for example react
and next
) have multiple versions installed:
gitpod /workspace/dev (main) $ npm list next
@deep-foundation/dev@0.0.21 /workspace/dev
├─┬ @deep-foundation/deepcase-app@0.1.0-beta.14 -> ./packages/deepcase-app
│ ├─┬ next-env@1.1.1
│ │ └── next@14.1.0
│ └── next@13.3.4
├─┬ @deep-foundation/deepcase@0.0.107 -> ./packages/deepcase
│ └── next@13.3.4
└─┬ @deep-foundation/deeplinks@0.0.330 -> ./packages/deeplinks
└─┬ @deep-foundation/store@0.0.30
└── next@14.1.0 deduped
next
was updated to 14.1
in both deepcase
and deepcase-app
gitpod /workspace/dev (main) $ npm list next
@deep-foundation/dev@0.0.21 /workspace/dev
├─┬ @deep-foundation/deepcase-app@0.1.0-beta.14 -> ./packages/deepcase-app
│ ├─┬ next-env@1.1.1
│ │ └── next@14.1.0 deduped
│ └── next@14.1.0
├─┬ @deep-foundation/deepcase@0.0.107 -> ./packages/deepcase
│ └── next@14.1.0 deduped
└─┬ @deep-foundation/deeplinks@0.0.330 -> ./packages/deeplinks
└─┬ @deep-foundation/store@0.0.30
└── next@14.1.0 deduped
Solution
Make sure no packages (for example
react
andnext
) have multiple versions installed:gitpod /workspace/dev (main) $ npm list next @deep-foundation/dev@0.0.21 /workspace/dev ├─┬ @deep-foundation/deepcase-app@0.1.0-beta.14 -> ./packages/deepcase-app │ ├─┬ next-env@1.1.1 │ │ └── next@14.1.0 │ └── next@13.3.4 ├─┬ @deep-foundation/deepcase@0.0.107 -> ./packages/deepcase │ └── next@13.3.4 └─┬ @deep-foundation/deeplinks@0.0.330 -> ./packages/deeplinks └─┬ @deep-foundation/store@0.0.30 └── next@14.1.0 deduped
next
was updated to14.1
in bothdeepcase
anddeepcase-app
gitpod /workspace/dev (main) $ npm list next @deep-foundation/dev@0.0.21 /workspace/dev ├─┬ @deep-foundation/deepcase-app@0.1.0-beta.14 -> ./packages/deepcase-app │ ├─┬ next-env@1.1.1 │ │ └── next@14.1.0 deduped │ └── next@14.1.0 ├─┬ @deep-foundation/deepcase@0.0.107 -> ./packages/deepcase │ └── next@14.1.0 deduped └─┬ @deep-foundation/deeplinks@0.0.330 -> ./packages/deeplinks └─┬ @deep-foundation/store@0.0.30 └── next@14.1.0 deduped
Have you solved it by using peer dependencies to not find and solve this problem manually and see dependency conflicts?
@FreePhoenix888 no, it was done using regular dependencies.
here
and here
@FreePhoenix888 no, it was done using regular dependencies.
here
e4ec1d0#diff-7ae45ad102eab3b6d7e7896acd08c427a9b25b346470d7bc6507b6481575d519L32
and here
Why not peer deps?