-
Notifications
You must be signed in to change notification settings - Fork 510
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
when fork the front end app, it runs, when i start the back...i get error TS2688:Cannot find type definition file for 'react-dom' #1
Comments
Did you install the type? |
Yeah I get the same error, the solution above didn't work. If I try to start NestJS (npm start from the NestJS folder) I get the same import error. The issue is on this file: TO FIX I added this at the start of the react-app.d.ts: And for some reason this fix the import problems and allows NestJS to start but I still get errors when starting the front-end app (npm start from the front-end folder). The issue is that for some reason npm/yarn install on the front-end folder will also install these node_modules into our NestJS folder. The packet manager gets confused because the react_modules for React are also present in the react_modules of NestJS. TO FIX: Create a file called .env with this code: SKIP_PREFLIGHT_CHECK=true in the root folder of task-management-frontend This is not a fix, just ignoring the issue and running the front-end app anyway. Full errors from terminal if anyone wants more info: Error after running npm run (inside front-end folder)
There might be a problem with the project dependency tree. The react-scripts package provided by Create React App requires a dependency: "babel-jest": "^24.8.0" Don't try to install it manually: your package manager does it automatically. /home/electro/Documents/nestjs-task-management/node_modules/babel-jest (version: 26.6.3) Manually installing incompatible versions is known to cause hard-to-debug issues. If you would prefer to ignore this check, add SKIP_PREFLIGHT_CHECK=true to an .env file in your project. To fix the dependency tree, try following the steps below in the exact order:
In most cases, this should be enough to fix the problem.
If nothing else helps, add SKIP_PREFLIGHT_CHECK=true to an .env file in your project. P.S. We know this message is long but please read the steps above :-) We hope you find them helpful! npm ERR! code ELIFECYCLE npm ERR! A complete log of this run can be found in: COMPLETE LOG0 info it worked if it ends with ok |
when fork the front end app, it runs, when i start the back...i get error TS2688:Cannot find type definition file for 'react-dom'
The text was updated successfully, but these errors were encountered: