Giter Club home page Giter Club logo

nestjs-nextjs-trpc's Introduction

Hi there ๐Ÿ‘‹

Thanks for stopping by! I'm Tom, from the UK and live in Brighton ๐Ÿ‡ฌ๐Ÿ‡ง.

A lot of my Github public repositories are NestJS code-alongs to tutorials on my blog.

Here are some of the most popular tutorials if you want to check them out!

nestjs-nextjs-trpc's People

Contributors

tomwray13 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

nestjs-nextjs-trpc's Issues

About the error "Module parse failed: The keyword 'enum' is reserved"

One cool thing about the monorepo configuration is the possibility of importing things from the server to the web, for example.
In my case, I was reusing some types defined on server, and some of those types were enums. Perhaps enums need a special parse, and Next.js can't parse them correctly because they are being imported from outside the root of the project.

From my research, enabling experimental configuration externalDir on next.config.js fixes the problem. But I'm opening this issue because I am not sure what trade-offs this configuration can bring. Maybe @tomwray13 has a better understanding and can provide us a better alternative, if that shows necessary. Or perhaps he could add it to the tutorial about the monorepo (which is great by the way).

It is worth mentioning that you can always duplicate the enum inside your next project and don't mind about this problem.

Thanks in advance.

TRPCClientError: No "query"-procedure on path "trpc/hello"

Trying to follow your tutorial and I'm getting the above error message. I'm new to both Next.js and Nest.js (primarily been an Angular programmer for years) as far as I can tell Next is working fine but Nest is having issues.
I'm sure it's something small and stupid but would really appreciate it if someone can point out what's wrong.

Unhandled Runtime Error
Error: Unexpected token 'I', "Internal S"... is not valid JSON

Call Stack
TRPCClientError.from
../node_modules/.pnpm/@[email protected]_@[email protected]/node_modules/@trpc/client/dist/TRPCClientError-0de4d231.mjs (37:15)
from
../node_modules/.pnpm/@[email protected]_@[email protected]/node_modules/@trpc/client/dist/httpUtils-0cb58db4.mjs (128:35)
process.processTicksAndRejections
node:internal/process/task_queues (95:5)

Unit testing NestJS + tRPC

Hi. Is there a way to test tRPC routers on NestJS? I'm having a hard time making it work. I have some ideas but no luck so far.

Why not decorators?

The power of NestJS lies in the decorators. I'm surprised that no one has yet tried to wrap tRPC functionality into decorators and enable their use with a custom platform, along the lines of how Express or Fastify has been integrated. Is there a stopper not allowing to go this way?

Bug in your last commit

Hey, I was testing the repo after reding your article, but it seems that after your last commit, the nextjs part (localhost:3000) does not work (but it work with the commit before). Just let you know

How to integrate new modules

If I write a module for user login, in what folder should I add it and how do I go about planning the dependent modules?

Kindly add examples for fastify adapters in NestJS

First of all, thanks for this awesome example!

But in my NestJS app, I am using Fastify adapters and my attempt to use it along with tRPC didn't pan out well.

Could you please add some examples regarding that? Thanks in advance!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.