t3-oss/t3-env

Cannot find module '@t3-oss/env-nextjs'

CarlosZiegler opened this issue · 2 comments

@juliusmarminge Sorry for delay, a lot do do, here is the current status from the error and a link to reproduce it.

Reference ISSUE: #189

Error:

Type error: Cannot find module '@t3-oss/env-nextjs' or its corresponding type declarations.
web-app:build:   There are types at '/Users/carlosziegler/zietec/saas-supabase-template/packages/env/node_modules/@t3-oss/env-nextjs/dist/index.d.ts', but this result could not be resolved under your current 'moduleResolution' setting. Consider updating to 'node16', 'nodenext', or 'bundler'.

Screenshot :
image

Link: https://github.com/CarlosZiegler/monorepo-template
Please uncomment @ts-ignore in packages/env/index.ts to get same error on BUILD

env pacakge works: CleanShot 2024-03-22 at 10 54 58@2x

the reason you get build errors during build is that your nextjs doesn't use a compatible module resolution:

CleanShot 2024-03-22 at 10 56 44@2x

after fixing that it "works" but i get new errors since you're referencing variables that doesn't exist on the env object:

CleanShot 2024-03-22 at 10 57 49@2x


CarlosZiegler/monorepo-template#6

Thanks, I dont understand how I cant got that :) Some times as changes, but maybe wrong place. I dont know :(
About variables, yes I pushed fast and missing to add it, sorry.

Thanks a lot :)