Hello! I’m doing the react course, but I am getting an error when I use the Joi-browser library. The error is this :
Could not find a declaration file for module ‘joi-browser’. ‘C:/Users/almta/OneDrive/Escritorio/vidly-project/node_modules/joi-browser/dist/joi-browser.js’ implicitly has an ‘any’ type.
Try npm i --save-dev @types/joi-browser if it exists or add a new declaration (.d.ts) file containing declare module 'joi-browser';
I searched for the file in the node-modules folder and i found it, I make sure about importing the module right, but still does not work, what can i do ?
This is whta appears in the console:
Uncaught TypeError: Cannot read properties of undefined (reading ‘string’)
at new RegisterMovieForm (registerMovie.jsx:21:1)
at constructClassInstance (react-dom.development.js:14323:1).
I already solve it, just open your terminal and desinstall joi browser using this command “npm uninstall -D joi-browser”, and then install it another time, but this time without the version that mosh uses, (with this command “npm i joi-browser”). By the way, since we are in the same part of the course i would like to study together. I think that the only thing that i miss about the schools or college are the partners hahaha
I don’t think that the problem is in the code, what appears in my console is this “/node_modules/react-toastify/dist/react-toastify.esm.mjs
Module build failed: Error: ENOENT: no such file or directory, open” Im sure that it is in the directory beacause i search for it and I’m sure that i wrote it well when I import it
Did you ever find a solution to this? I am also having issues with toastify, I assume its to do with using the latest version with Mosh’s outdated downloaded http-app