I am trying to set up react app using create-react-app command on windows pc. I already used it on my mac computer, and it works well. But I encounter a problem. Here my steps on command line. Am i missing something?
C:Windowssystem32>cd C:UsersugurDesktopdeneme
C:UsersugurDesktopdeneme>npm init
This utility will walk you through creating a package.json file.
It only covers the most common items, and tries to guess sensible defaults.
See 'npm help json' for definitive documentation on these fields
and exactly what they do.
Use 'npm install <pkg> --save' afterwards to install a package and
save it as a dependency in the package.json file.
Press ^C at any time to quit.
name: (deneme)
version: (1.0.0)
description:
entry point: (index.js)
test command:
git repository:
keywords:
license: (ISC)
About to write to C:UsersugurDesktopdenemepackage.json:
{
"name": "deneme",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo "Error: no test specified" && exit 1"
},
"author": "Ugur <[email protected]> (http://www.abc.com.tr)",
"license": "ISC"
}
Is this ok? (yes)
C:UsersugurDesktopdeneme>npm install -g create-react-app
C:UsersugurAppDataRoaming
pmcreate-react-app -> C:Usersugur
AppDataRoaming
pm
ode_modulescreate-react-appindex.js
C:UsersugurAppDataRoaming
pm
`-- [email protected]
+-- [email protected]
| +-- [email protected]
| +-- [email protected]
| +-- [email protected]
| | `-- [email protected]
| +-- [email protected]
| `-- [email protected]
+-- [email protected]
| +-- [email protected]
| | +-- [email protected]
| | `-- [email protected]
| `-- [email protected]
| `-- [email protected]
+-- [email protected]
`-- [email protected]
C:UsersugurDesktopdeneme>create-react-app new_app
'create-react-app' is not recognized as an internal or external command, operable program or batch file.
Also npm configuration path is like
C:UsersugurAppDataRoaming
pm
ode_modulescreate-react-app
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…