Weird errors upon scaffolding / launching the project #12414
-
Hello
I have noticed that there is no types folder in my project structure. It seemed weird to have this error upon launching the project and I am not sure how to solve it. edit: |
Beta Was this translation helpful? Give feedback.
Replies: 6 comments 10 replies
-
Hi again, Now there is no type error but when I tried to run the server following errors appeared on the terminal Seems, there is an error in installing the node modules The errors on the terminal:
and so on.... NOTE: |
Beta Was this translation helpful? Give feedback.
-
Not sure the solution is, but I'm also running into the |
Beta Was this translation helpful? Give feedback.
-
Thanks for the comments. Thanks, Errors:
✘ [ERROR] No matching export in "node_modules/react-router/dist/development/index.mjs" for import "UNSAFE_useRoutesImpl"
✘ [ERROR] No matching export in "node_modules/react-router/dist/development/index.mjs" for import "UNSAFE_useRouteId"
✘ [ERROR] No matching export in "node_modules/react-router/dist/development/index.mjs" for import "AbortedDeferredError"
✘ [ERROR] No matching export in "node_modules/react-router/dist/development/index.mjs" for import "UNSAFE_useRouteId"
✘ [ERROR] No matching export in "node_modules/react-router/dist/development/index.mjs" for import "defer"
✘ [ERROR] No matching export in "node_modules/react-router/dist/development/index.mjs" for import "json"
|
Beta Was this translation helpful? Give feedback.
-
If anyone is using nvm(node version manager) and used it to install node 20, check to see if it defaults back to using node 16, 18 or whatever older version you had before when you reopen your shells/environments.
|
Beta Was this translation helpful? Give feedback.
-
Are you using any external packages in your project or is it just the create react router project? I remember getting similar errors when I used a package that had not migrated some of it's modules to import from In my case, I checked out the package, noticed the missing/changed imports from react router, copied some of the code I needed and reconverted it locally in my codebase to import from react router and support new imports from react router. For instance the So if you are using an external pacakge apart from the default provided in the create react router app, you can check the package to see.... If not too, then check your local imports in your codebase to make sure the packages you are importing actually exist in react router if not, then check for what has changed and replace it. |
Beta Was this translation helpful? Give feedback.
-
Probably changing to import type { MetaArgs } from "react-router";
export function meta({}: MetaArgs) { is a solution |
Beta Was this translation helpful? Give feedback.
I don't know if this relates to your issue since you did not use a template but you can check out this issue to see:
#12364
If all fails, I guess you can use the library mode with a vite application and react router to start things out at least till this issue is figured out.