I'm having trouble installing React on an empty project in WebStorm. The instructions on the WebStorm help page tells me to get create-react-app.
Is there a way I can just get react? And if not, what is the difference between the two?
I'm trying to follow this specific tutorial series online about React for beginners. It's a 4 minute video so can anyone please explain to me what the youtuber did?
I would recommend using create-react-app because you will not need to install or configure tools like Webpack or Babel.
You need to install it from https://github.com/facebook/create-react-app if you have npm (node package manager) installed you can just type npm install -g create-react-app
Related
When I try to run npm create-react-app <name>, I encounter error reports. I've tried updating my node.js/npm and several other things and just don't work.
as you see in the error message, you have to install the last version of Visual Studio, take a look at node-gyp README, there is a guide to install and configure the dependencies.
suggest: use the npx to initialize a new react project with CRA, this way you will install the latest version each time.
I've tried following this guide 10 times today: https://reactnative.dev/docs/native-modules-android
I just tried on a clean project following the guidelines exactly. No matter what I do I always get
null is not an object (evaluating '_ToastExample.default.show')
steps to reproduce:
expo init javatest --npm
npx #react-native-community/bob create react-native-awesome-module
And then follow the guide.
npm --version 6.14.8
react-native --version
react-native-cli: 2.0.1
react-native: 0.63.3
expo --version 3.27.13
Here is a git repo of it, but as I said... I followed the guide exactly like 5 times... so maybe it's Expo?
https://github.com/unknownFrequency/react-native-native-module
I created ToastExample.js in the root folder in the same location as App.js (guide says it must be placed in the same hierarcy as it is imported)
Apparently Expo does not support custom native modules.
https://docs.expo.io/introduction/why-not-expo/
I am coding with React Native. I don't see that when I first create react-native app for check running. When I implements my code see that. My purpose is generate apk.
app.json
build.gradle
index.js (index.android.json)
App package.json
Solved
Result: I solved my problem with npm install. I would like say many month after.
If anyone's getting this error after upgrading Expo, try restarting your simulator - that fixed it for me.
Here is my experience if someone using expo sees those error message.
I accidentally installed expo manually in my project which was version 29.0.0.
I was using version 28.0.0 of expo sdk, so it may have crashed inside.
What I did:
manually upgrade sdkVersion of app.json to 29.0.0.
change sdk version to 29.0.0 for react-native.
Had exactly the same error - fresh machine, fresh npm, only one version of expo installed.
Turns out, expo requires you to build it as an app before it can send it to the expo app properly (at least on Android). This is easiest done by:
Adding an "android" section to app.json, with the contents "package": "uk.co.yourcompany.yourpackagename" (this is required by android packages. It can be complete garbage, but should follow that format - a backwards domain name)
running expo build:android and following the instructions to sign up to expo's servers and build the app
then restarting expo start
Not sure if this is documented anywhere though, so may be a new thing?
Another thing to try is to move your node_modules folder away (or maybe delete it, up to you) and re-run npm install
According to the official tutorial: https://facebook.github.io/react-native/blog/2017/03/13/introducing-create-react-native-app.html
If you want to use expo in your application, you must create it in the following way
npm i -g create-react-native-app
create-react-native-app my-project
cd my-project
npm start
This will start the React Native packager and print a QR code. Open it in the Expo app to load your JavaScript.
as I see your code has files that are not necessary, such as build.gradle and index.js, the structure that create-react-native-app creates is different and easier to use
I was getting the same error after updating the expo-cli to version 3.0.6.
By looking at my package.json I noticed the expo-cli version installed on my computer is not the same as package.json. so I changed it to "expo-cli": "^3.0.6" and ran npm install || yarn, then the error disappeared!
I am learning React. I wanted to create new project using React/React router/ES6. I read tones articles about setuping project using grunt/webpack etc. I tried to setup using simply npm. I believe it is possible to do this without of tons of configuration and adding many external libraries. But I don't know how :) Can someone give me some articles how to setup project using only npm?
Thanks for all answers
Best easy way to start react project
install react-create app by using following command
//install react create app globally to the system
npm install -g create-react-app
// generate project
create-react-app appName
cd my-app/
npm start
I'm trying to create a React project in WebStorm 2016.3.1
It's asking me for a create-react-app but I have no idea what that is and I can't find any reference on Google.
What is it and where can I find the value?
You need to install create-react-app npm module, before you use this feature.
npm install -g create-react-app
You can read more about this feature on the official release blog of WebStorm.
Excerpt from the documentation :
Make sure that you have create-react-app installed globally on your computer, for that run npm install -g create-react-app. Then to start your new project, double click on the start task in the npm tasks tool window to run it. That’s it!
I had ie installed create-react-app globally using yarn and webstorm failed to find it. Then I used npm, not to mention globally and its working like a charm.
TL;DRNo need to install anything. Just enter npx create-react-app in the create-react-app field & it should work like a pycharm, I mean charm :)
Side note: npx is pre-bundled with npm since npm version 5.2.0.
I created webStrom react app following this steps.
Download node.js
Open command line console and type "npm install -g create-react-app"
Create react app project from web-storm.
Make sure you provided the correct file path of create-react-app , by default it is
installed in ~\AppData\Roaming\npm\node_modules\create-react-app
use
npm start: to start development server
If you are using asdf or any other tool to manage multiple versions of nodejs, you will need to set up the path to create-react-app manually
I'm on mac, so for me the path was
/Users/<USER>/.asdf/installs/nodejs/12.16.2/.npm/lib/node_modules/create-react-app