I'm following the official Todo App with React tutorial. If I follow the steps exactly, after step 2.5, I get an error:
=> Exited with code: 1
Unable to resolve some modules:
"#babel/runtime/helpers/interopRequireDefault" in
/.../todos/imports/ui/App.js (web.browser.legacy)
"#babel/runtime/helpers/inheritsLoose" in
/.../todos/imports/ui/App.js (web.browser.legacy)
If you notice problems related to these missing modules, consider running:
meteor npm install --save #babel/runtime
It seems that the current versions of Meteor and the React npm package do not automatically install Babel, so JSX code is not converted to JS.
It would make life easier for others who want to follow this tutorial if the commands ...
meteor npm install --save react react-dom
meteor npm install --save #babel/runtime
... were given together.
Related
I am trying to deploy a React Native project, however when using React Native 18.0.0 - I get the following errors:
Solutions Tried
removing node_modules and package.json.lock and downgrading react to 17.0.2 - I then get:
npm install --legacy-peer-deps
npm i web-vitals --save-dev
npm config set legacy-peer-deps
Nothing works.
Is successful deployment even possible?
Check your package.json probably you have the wrong version or react in dependencies. The right version for RN 0.69.6 is "react": "18.0.0"
I want to create a React application and I want to use a typescript in this application, at first I went to the React website in order to create an application using typescript and I found that I had to put this instruction in the terminal first:
npx create-react-app my-app --template typescript
And when it finished installing, I put it in the terminal:
npm start
But I got this error:
It looks like you're trying to use TypeScript but do not have typescript installed
I opened the terminal and wrote this instruction:
npm install
then i run the app:
npm start
But the error is still there
How can I solve the problem?
I solved my problem with the following instruction:
npm install --save typescript #types/node #types/react #types/react-dom #types/jest
or
yarn add typescript #types/node #types/react #types/react-dom #types/jest
have you tried
npm install -g typescript
yes i tryed but still with error
Have you tried
npm run start
Consider upgrading Next.js 11 to 12 or to latest version. Also, you need to upgrade types to latest for react and react-dom. Here is a brief documentation about that:
https://nextjs.org/docs/upgrading#upgrade-nextjs-version-to-12
How can I downgrade my React version from 17 to 16 as many of the React packages are not supported by React 17?
Assuming you're using npm/yarn or another node package manager, dependency versions are listed in package.json.
Search for the react and react-dom packages under dependencies (or devDependencies) and replace their versions with 16.13.0. Then run npm install or yarn or whatever package manager you're using. This should be enough to downgrade to React 16.
If you have packages not compatible with React 16, you might have to downgrade them, too.
After updating dependencies inside package.json you need to run npm install for the changes to take place.
Or if you want to do it all inside of command line you can do it like this:
npm install --save react#16.13.0 react-dom#16.13.0
Source: linasmnew's answer to reactjs - Going back from React 16 to 15 - Stack Overflow
Because I needed redux-devtools as a package on an old project, I had to downgrade from React v17 to React v16. That's what i have done:
npm uninstall react-redux npm uninstall redux
npm install --save react#16.14.0 react-dom#16.14.0
npm install redux npm install react-redux
npm install --save-dev redux-devtools
I'm trying to run Uppy React example from official site https://uppy.io/docs/react/. I'm new with React, I installed
npm install #uppy/react
but it showed next errors:
I should have installed core and tus :-D
npm install #uppy/core
npm install #uppy/tus
I am trying to setup my first react application. I installed all the npm packages required. But getting this error.
npm uninstall webpack --save-dev
npm install webpack#2.1.0-beta.22 --save-dev