I’m upgrading my Vida app from 0.16 to 0.19. I’m hitting an error with import.
./src/pages/CreateDashboardPage/CreateDashboard.tsx
Module not found: Error: Can't resolve '../../components/DashboardComponent' in '/Users/phuocdo/Workspace/redwoodjs/vida/web/src/pages/CreateDashboardPage'
The issue seems to be related to JavaScript and TypeScript. The CreateDashboardPage component is JavaScript and DashboardComponent is TypeScript. The code is here:
I notice that there’s an import of DashboardsLayout. This is import throws no error because DashboardsLayout is in JavaScript.
Has anyone faced this issue? Should I start migrate Page objects into TypeScript?
The page is CreateDashboardPage.js. It references CreateDashboard.tsx. The Router references CreateDashboardPage. I have to organize the code this way because the Router cannot include TypeScript code. This is a way of reducing the amount of JavaScript.
So maybe, if you want to, you could try upgrading to latest canary and see if that works. Or (safer option) you’ll wait until 0.20.0 is out and give that a try