-1
1CAP-MACOSX:~ Jojie$ npm install -g create-react-app
/Users/Jojie/.npm-packages/bin/create-react-app -> /Users/Jojie/.npm-packages/lib/node_modules/create-react-app/index.js
/Users/Jojie/.npm-packages/lib
└─┬ create-react-app@1.3.0 
  ├─┬ chalk@1.1.3 
  │ ├── ansi-styles@2.2.1 
  │ ├── escape-string-regexp@1.0.5 
  │ ├─┬ has-ansi@2.0.0 
  │ │ └── ansi-regex@2.1.1 
  │ ├── strip-ansi@3.0.1 
  │ └── supports-color@2.0.0 
  ├─┬ commander@2.9.0 
  │ └── graceful-readlink@1.0.1 
  ├─┬ cross-spawn@4.0.2 
  │ ├─┬ lru-cache@4.0.2 
  │ │ ├── pseudomap@1.0.2 
  │ │ └── yallist@2.1.2 
  │ └─┬ which@1.2.14 
  │   └── isexe@2.0.0 
  ├─┬ fs-extra@1.0.0 
  │ ├── graceful-fs@4.1.11 
  │ ├── jsonfile@2.4.0 
  │ └── klaw@1.3.1 
  ├─┬ hyperquest@2.1.2 
  │ ├─┬ buffer-from@0.1.1 
  │ │ └─┬ is-array-buffer-x@1.2.1 
  │ │   ├─┬ has-to-string-tag-x@1.2.0 
  │ │   │ └── has-symbol-support-x@1.2.0 
  │ │   ├─┬ is-object-like-x@1.2.0 
  │ │   │ ├── is-function-x@1.2.0 
  │ │   │ └── is-primitive@2.0.0 
  │ │   └─┬ to-string-tag-x@1.2.0 
  │ │     ├── lodash.isnull@3.0.0 
  │ │     └── validate.io-undefined@1.0.3 
  │ ├─┬ duplexer2@0.0.2 
  │ │ └─┬ readable-stream@1.1.14 
  │ │   ├── isarray@0.0.1 
  │ │   └── string_decoder@0.10.31 
  │ └─┬ through2@0.6.5 
  │   ├── readable-stream@1.0.34 
  │   └── xtend@4.0.1 
  ├── semver@5.3.0 
  ├─┬ tar-pack@3.4.0 
  │ ├─┬ debug@2.6.4 
  │ │ └── ms@0.7.3 
  │ ├─┬ fstream@1.0.11 
  │ │ ├── inherits@2.0.3 
  │ │ └─┬ mkdirp@0.5.1 
  │ │   └── minimist@0.0.8 
  │ ├─┬ fstream-ignore@1.0.5 
  │ │ └─┬ minimatch@3.0.3 
  │ │   └─┬ brace-expansion@1.1.7 
  │ │     ├── balanced-match@0.4.2 
  │ │     └── concat-map@0.0.1 
  │ ├─┬ once@1.4.0 
  │ │ └── wrappy@1.0.2 
  │ ├─┬ readable-stream@2.2.9 
  │ │ ├── buffer-shims@1.0.0 
  │ │ ├── core-util-is@1.0.2 
  │ │ ├── isarray@1.0.0 
  │ │ ├── process-nextick-args@1.0.7 
  │ │ ├── string_decoder@1.0.0 
  │ │ └── util-deprecate@1.0.2 
  │ ├─┬ rimraf@2.6.1 
  │ │ └─┬ glob@7.1.1 
  │ │   ├── fs.realpath@1.0.0 
  │ │   ├── inflight@1.0.6 
  │ │   └── path-is-absolute@1.0.1 
  │ ├─┬ tar@2.2.1 
  │ │ └── block-stream@0.0.9 
  │ └── uid-number@0.0.6 
  ├─┬ tmp@0.0.31 
  │ └── os-tmpdir@1.0.2 
  └─┬ validate-npm-package-name@3.0.0 
    └── builtins@1.0.3 

1CAP-MACOSX:~ Jojie$ cd Desktop/myProject/
1CAP-MACOSX:myProject Jojie$ create-react-app my-app
-bash: create-react-app: command not found
Cœur
  • 37,241
  • 25
  • 195
  • 267

1 Answers1

0

Like with any global npm command, you need to ensure the global installation directory is in your PATH. The directory based on your question is /Users/Jojie/.npm-packages/bin/. So make sure to put it in your PATH. How to do it depends on the shell you use but this answer might help.

Community
  • 1
  • 1
Dan Abramov
  • 264,556
  • 84
  • 409
  • 511