Comments (4)
This has been a reoccurring issue, and I am not entirely sure what the best way to fix it is. I have included next as a peerDependency, but it's not working as I expected it would.
I'm not very well-versed in how peer deps work and would like to use the user's next-server rather than limiting it to the implementation of the next-server version that it was transpiled with. Maybe you could provide some insight? An easy work around would just for this lib to type the second arg of register as any, but this is a less than ideal solution IMO.
register method: https://github.com/kyle-mccarthy/nest-next/blob/master/lib/render.module.ts#L23
from nest-next.
I think the fact that next is also a required dependency may be the culprit. If the semver versions are incompatible, next-nest will get its own copy of Next, rathert than the main one.
That said, "9.1.4" should be semver compatible to "^9.0.6", so I'm not sure why a separate copy is given... or maybe npm always does it, not just on mismatches... I use yarn, which definetly doesn't do that, but instead hoists compatible deps.
Anyway, as a solution, change it to a devDependency I guess?
from nest-next.
@boenrobot Yup you are correct -- I had it is a peerDependency + dependency but it actually should be peerDependency + devDependency. I'll just pushed v9.1.1 with the correct package.json @ArrayKnight can you let me know if the new version resolves your issue?
from nest-next.
Sorry about the delayed response, I was on holiday. I can confirm that this has been fixed. Thank you
from nest-next.
Related Issues (20)
- got a lot of 404 error HOT 1
- Next "catch all routes" does not work HOT 1
- When using generate staticPaths, staticProps and then use it to get page - it always says 404. Only works for fallback: 'blocking' HOT 5
- Make an npx starter
- next.server.dynamicRoutes.map is a TypeError HOT 7
- Help with Setup HOT 2
- Cannot read properties of undefined (reading 'nextConfig') HOT 4
- Failed to serve static file from next side
- Cannot render page with path "\index", did you mean "/\index"? HOT 5
- How to shallow render with next useRouter hooks? HOT 1
- Next.js 12 hmr HOT 3
- Inject Dynamic url parameter into template HOT 5
- How to set next.config and how to use less HOT 1
- Not able to reach nest endpoints. HOT 1
- Module-wide type error (Fix included) HOT 3
- Usage with Next@13 HOT 8
- Nest routing issue with nested pages HOT 15
- nest-next test suite HOT 1
- Standalone Nest application HOT 1
- res.setHeader is not a function When i add new FastifyAdapter() HOT 10
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nest-next.