Tutorial error: Cannot find module '.auth'

I get this error after following the guide:

Cannot find module ‘./auth’ or its corresponding type declarations.ts(2307)

When I try to change it to functions/lib i instead get this error

Cannot find module ‘./functions/auth’ or its corresponding type declarations.ts(2307)

Any help would be appreciated
Windows
node 16.13.1
yarn 3.3.1
yarn redwood --version
3.8.0

Hi. Could you share a public repo and steps to reproduce? Thanks.

Hi Oscar,

I think you’re seeing this error because you’re following the docs for version 4.0, while your project is in the previous major version 3.8.0.

We’ve introduced breaking changes in this release, particularly related to auth. So my suggestions here are one of two options:

a) Follow the equivalent docs for version 3.x here: Authentication | RedwoodJS Docs

OR

b) Upgrade your project to Redwood 4.x following this guide: Redwood v4.0.0 Upgrade Guide, and then continue your tutorial journey!

Hope this helps.

Haha yes. I even included redwood version 3.8 and a link to 4.0 docs. :joy:

Thank you so much for the help. Great community you have here. And cheers for making this framework available!

Oscar

1 Like