Home > Enterprise >  React app creation: create-react-app doesn't have any effect
React app creation: create-react-app doesn't have any effect

Time:11-22

I'm trying to create a React application using create-react-app.

Whenever I run the command, nothing happens (no effect in console and no files created): create.react.app no effect

I tried to reinstall npm, update node, clean cache, and other things.

Can anyone help with this?

CodePudding user response:

have you install npm correctly?

please check npm in command line

npm

version should appear

npm <command>

Usage:

npm install        install all the dependencies in your project
npm install <foo>  add the <foo> dependency to your project
npm test           run this project's tests
npm run <foo>      run the script named <foo>
npm <command> -h   quick help on <command>
npm -l             display usage info for all commands
npm help <term>    search for help on <term>
npm help npm       more involved overview

All commands:

    access, adduser, audit, bin, bugs, cache, ci, completion,
    config, dedupe, deprecate, diff, dist-tag, docs, doctor,
    edit, exec, explain, explore, find-dupes, fund, get, help,
    hook, init, install, install-ci-test, install-test, link,
    ll, login, logout, ls, org, outdated, owner, pack, ping,
    pkg, prefix, profile, prune, publish, rebuild, repo,
    restart, root, run-script, search, set, set-script,
    shrinkwrap, star, stars, start, stop, team, test, token,
    uninstall, unpublish, unstar, update, version, view, whoami

Specify configs in the ini-formatted file:
    /Users/peter.lam/.npmrc
or on the command line via: npm <command> --key=value

More configuration info: npm help config
Configuration fields: npm help 7 config

[email protected] /usr/local/lib/node_modules/npm

CodePudding user response:

Its likely that you have missed to wrap the filename with single quotes

as per your command you need to type : npx create-react-app 'hello-world' This will create a react app with name hello-world in your folder named 'trail' and if you want to create the react app in the trail folder itself you should give the command which mentioned below 'npx create-react-app .'

Lets hack it brother

CodePudding user response:

Please read documents and try to follow steps provided in this document
React Native Create App

1 - Install Node JS
2 - Check Node version using node -v if return any version then Node JS installed correctly
3 - Then try to create your react js app by following commands

npx create-react-app my-app
cd my-app
npm start

CodePudding user response:

it's

npm create react-app <your-app-name>

if you'd like to use a typescript template, then, it's

npm create react-app <your-app-name> --template typescript
  • Related