Mohamed faruk
Mohamed faruk

Reputation: 59

Getting a error for creating a app in react

I uninstalled both visual studio code and node js. Restarted machine. Installed again both visual studio and node js. But the problem is there.

PS D:\React> npm create-react-app myapp

Usage: npm <command>

where <command> is one of:
    access, adduser, audit, bin, bugs, c, cache, ci, cit,
    clean-install, clean-install-test, completion, config,
    create, ddp, dedupe, deprecate, dist-tag, docs, doctor,
    edit, explore, fund, get, help, help-search, hook, i, init,
    install, install-ci-test, install-test, it, link, list, ln,
    login, logout, ls, org, outdated, owner, pack, ping, prefix,
    profile, prune, publish, rb, rebuild, repo, restart, root,
    run, run-script, s, se, search, set, shrinkwrap, star,
    stars, start, stop, t, team, test, token, tst, un,
    uninstall, unpublish, unstar, up, update, v, version, view,
    whoami

npm <command> -h  quick help on <command>
npm -l            display full usage info
npm help <term>   search for help on <term>
npm help npm      involved overview

Specify configs in the ini-formatted file:
    C:\Users\ee209495\.npmrc
or on the command line via: npm <command> --key value
Config info can be viewed via: npm help config

[email protected] C:\Program Files\nodejs\node_modules\npm

Upvotes: 0

Views: 416

Answers (2)

Punit Makwana
Punit Makwana

Reputation: 535

You first need to install create-react-app package globally

npm i -g create-react-app
create-react-app my app

or alternatively you can use npx to always use the latest version of CRA

npx create-react-app my-app

Upvotes: 1

Carlos Saiz Orteu
Carlos Saiz Orteu

Reputation: 1805

Have you installed create-reat-app previously?

npm install -g create-react-app

Also, you can use npx so it would be using latest npm version

npx create-react-app my-app

Upvotes: 1

Related Questions