Web Can';即使在$sudo命令之后也不能安装Gulp

Web Can';即使在$sudo命令之后也不能安装Gulp,web,npm,gulp,Web,Npm,Gulp,我一直试图在我的mac上使用sudo命令安装gulp,但似乎没有成功。我以前已成功安装了node。我将所有发生的事情粘贴到下面的屏幕上。在所有这些文本之后。我在终端中键入了gulp-v命令,但gulp尚未安装。>>>-bash:gulp:未找到命令 我该怎么办? 提前非常感谢你 sudo npm install gulp -f Password: npm WARN using --force I sure hope you know what you are doing.

我一直试图在我的mac上使用sudo命令安装gulp,但似乎没有成功。我以前已成功安装了node。我将所有发生的事情粘贴到下面的屏幕上。在所有这些文本之后。我在终端中键入了gulp-v命令,但gulp尚未安装。>>>-bash:gulp:未找到命令

我该怎么办? 提前非常感谢你

sudo npm install gulp -f
    Password:
    npm WARN using --force I sure hope you know what you are doing.
    npm WARN deprecated minimatch@2.0.10: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
    npm WARN deprecated minimatch@0.2.14: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
    npm WARN deprecated graceful-fs@1.2.3: graceful-fs v3.0.0 and before will fail on node releases >= v7.0. Please update to graceful-fs@^4.0.0 as soon as possible. Use 'npm ls graceful-fs' to find it in the tree.
    /Users/macbook
    └─┬ gulp@3.9.1 
      ├── archy@1.0.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 
      ├── deprecated@0.0.1 
      ├─┬ gulp-util@3.0.8 
      │ ├── array-differ@1.0.0 
      │ ├── array-uniq@1.0.3 
      │ ├── beeper@1.1.1 
      │ ├── dateformat@2.0.0 
      │ ├─┬ fancy-log@1.3.0 
      │ │ └── time-stamp@1.0.1 
      │ ├─┬ gulplog@1.0.0 
      │ │ └── glogg@1.0.0 
      │ ├─┬ has-gulplog@0.1.0 
      │ │ └── sparkles@1.0.0 
      │ ├── lodash._reescape@3.0.0 
      │ ├── lodash._reevaluate@3.0.0 
      │ ├── lodash._reinterpolate@3.0.0 
      │ ├─┬ lodash.template@3.6.2 
      │ │ ├── lodash._basecopy@3.0.1 
      │ │ ├── lodash._basetostring@3.0.1 
      │ │ ├── lodash._basevalues@3.0.0 
      │ │ ├── lodash._isiterateecall@3.0.9 
      │ │ ├─┬ lodash.escape@3.2.0 
      │ │ │ └── lodash._root@3.0.1 
      │ │ ├─┬ lodash.keys@3.1.2 
      │ │ │ ├── lodash._getnative@3.9.1 
      │ │ │ ├── lodash.isarguments@3.1.0 
      │ │ │ └── lodash.isarray@3.0.4 
      │ │ ├── lodash.restparam@3.6.1 
      │ │ └── lodash.templatesettings@3.1.1 
      │ ├─┬ multipipe@0.1.2 
      │ │ └─┬ duplexer2@0.0.2 
      │ │   └── readable-stream@1.1.14 
      │ ├── object-assign@3.0.0 
      │ ├── replace-ext@0.0.1 
      │ ├─┬ through2@2.0.3 
      │ │ ├─┬ readable-stream@2.2.9 
      │ │ │ ├── buffer-shims@1.0.0 
      │ │ │ ├── core-util-is@1.0.2 
      │ │ │ ├── inherits@2.0.3 
      │ │ │ ├── isarray@1.0.0 
      │ │ │ ├── process-nextick-args@1.0.7 
      │ │ │ ├── string_decoder@1.0.0 
      │ │ │ └── util-deprecate@1.0.2 
      │ │ └── xtend@4.0.1 
      │ └─┬ vinyl@0.5.3 
      │   ├── clone@1.0.2 
      │   └── clone-stats@0.0.1 
      ├── interpret@1.0.3 
      ├─┬ liftoff@2.3.0 
      │ ├── extend@3.0.1 
      │ ├─┬ findup-sync@0.4.3 
      │ │ ├─┬ detect-file@0.1.0 
      │ │ │ └── fs-exists-sync@0.1.0 
      │ │ ├─┬ is-glob@2.0.1 
      │ │ │ └── is-extglob@1.0.0 
      │ │ ├─┬ micromatch@2.3.11 
      │ │ │ ├─┬ arr-diff@2.0.0 
      │ │ │ │ └── arr-flatten@1.0.3 
      │ │ │ ├── array-unique@0.2.1 
      │ │ │ ├─┬ braces@1.8.5 
      │ │ │ │ ├─┬ expand-range@1.8.2 
      │ │ │ │ │ └─┬ fill-range@2.2.3 
      │ │ │ │ │   ├── is-number@2.1.0 
      │ │ │ │ │   ├─┬ isobject@2.1.0 
      │ │ │ │ │   │ └── isarray@1.0.0 
      │ │ │ │ │   ├── randomatic@1.1.6 
      │ │ │ │ │   └── repeat-string@1.6.1 
      │ │ │ │ ├── preserve@0.2.0 
      │ │ │ │ └── repeat-element@1.1.2 
      │ │ │ ├─┬ expand-brackets@0.1.5 
      │ │ │ │ └── is-posix-bracket@0.1.1 
      │ │ │ ├── extglob@0.3.2 
      │ │ │ ├── filename-regex@2.0.1 
      │ │ │ ├─┬ kind-of@3.2.0 
      │ │ │ │ └── is-buffer@1.1.5 
      │ │ │ ├─┬ normalize-path@2.1.1 
      │ │ │ │ └── remove-trailing-separator@1.0.1 
      │ │ │ ├─┬ object.omit@2.0.1 
      │ │ │ │ ├─┬ for-own@0.1.5 
      │ │ │ │ │ └── for-in@1.0.2 
      │ │ │ │ └── is-extendable@0.1.1 
      │ │ │ ├─┬ parse-glob@3.0.4 
      │ │ │ │ ├─┬ glob-base@0.3.0 
      │ │ │ │ │ └── glob-parent@2.0.0 
      │ │ │ │ └── is-dotfile@1.0.2 
      │ │ │ └─┬ regex-cache@0.4.3 
      │ │ │   ├── is-equal-shallow@0.1.3 
      │ │ │   └── is-primitive@2.0.0 
      │ │ └─┬ resolve-dir@0.1.1 
      │ │   └─┬ global-modules@0.2.3 
      │ │     ├─┬ global-prefix@0.1.5 
      │ │     │ ├─┬ homedir-polyfill@1.0.1 
      │ │     │ │ └── parse-passwd@1.0.0 
      │ │     │ ├── ini@1.3.4 
      │ │     │ └─┬ which@1.2.14 
      │ │     │   └── isexe@2.0.0 
      │ │     └── is-windows@0.2.0 
      │ ├─┬ fined@1.0.2 
      │ │ ├── expand-tilde@1.2.2 
      │ │ ├── lodash.assignwith@4.2.0 
      │ │ ├── lodash.isempty@4.4.0 
      │ │ ├── lodash.pick@4.4.0 
      │ │ └─┬ parse-filepath@1.0.1 
      │ │   ├─┬ is-absolute@0.2.6 
      │ │   │ └─┬ is-relative@0.2.1 
      │ │   │   └─┬ is-unc-path@0.1.2 
      │ │   │     └── unc-path-regex@0.1.2 
      │ │   ├── map-cache@0.2.2 
      │ │   └─┬ path-root@0.1.1 
      │ │     └── path-root-regex@0.1.2 
      │ ├── flagged-respawn@0.3.2 
      │ ├── lodash.isplainobject@4.0.6 
      │ ├── lodash.isstring@4.0.1 
      │ ├── lodash.mapvalues@4.6.0 
      │ ├── rechoir@0.6.2 
      │ └─┬ resolve@1.3.3 
      │   └── path-parse@1.0.5 
      ├── minimist@1.2.0 
      ├─┬ orchestrator@0.3.8 
      │ ├─┬ end-of-stream@0.1.5 
      │ │ └─┬ once@1.3.3 
      │ │   └── wrappy@1.0.2 
      │ ├── sequencify@0.0.7 
      │ └── stream-consume@0.1.0 
      ├── pretty-hrtime@1.0.3 
      ├── semver@4.3.6 
      ├─┬ tildify@1.2.0 
      │ └── os-homedir@1.0.2 
      ├─┬ v8flags@2.1.1 
      │ └── user-home@1.1.1 
      └─┬ vinyl-fs@0.3.14 
        ├── defaults@1.0.3 
        ├─┬ glob-stream@3.1.18 
        │ ├─┬ glob@4.5.3 
        │ │ └── inflight@1.0.6 
        │ ├─┬ glob2base@0.0.12 
        │ │ └── find-index@0.1.1 
        │ ├─┬ minimatch@2.0.10 
        │ │ └─┬ brace-expansion@1.1.7 
        │ │   ├── balanced-match@0.4.2 
        │ │   └── concat-map@0.0.1 
        │ ├── ordered-read-streams@0.1.0 
        │ ├─┬ through2@0.6.5 
        │ │ └── readable-stream@1.0.34 
        │ └── unique-stream@1.0.0 
        ├─┬ glob-watcher@0.0.6 
        │ └─┬ gaze@0.5.2 
        │   └─┬ globule@0.1.0 
        │     ├─┬ glob@3.1.21 
        │     │ ├── graceful-fs@1.2.3 
        │     │ └── inherits@1.0.2 
        │     ├── lodash@1.0.2 
        │     └─┬ minimatch@0.2.14 
        │       ├── lru-cache@2.7.3 
        │       └── sigmund@1.0.1 
        ├─┬ graceful-fs@3.0.11 
        │ └── natives@1.1.0 
        ├─┬ mkdirp@0.5.1 
        │ └── minimist@0.0.8 
        ├─┬ strip-bom@1.0.0 
        │ ├── first-chunk-stream@1.0.0 
        │ └── is-utf8@0.2.1 
        ├─┬ through2@0.6.5 
        │ └─┬ readable-stream@1.0.34 
        │   ├── isarray@0.0.1 
        │   └── string_decoder@0.10.31 
        └─┬ vinyl@0.4.6 
          └── clone@0.2.0 

    npm WARN enoent ENOENT: no such file or directory, open '/Users/macbook/package.json'
    npm WARN macbook No description
    npm WARN macbook No repository field.
    npm WARN macbook No README data
    npm WARN macbook No license field.
    Macbooks-MBP:~ Lililashka$ gulp -v
    -bash: gulp: command not found
    Macbooks-MBP:~ Lililashka$ npm uninstall -g gulp
    Macbooks-MBP:~ Lililashka$ npm uninstall package-name
    npm WARN enoent ENOENT: no such file or directory, open '/Users/macbook/package.json'
    npm WARN macbook No description
    npm WARN macbook No repository field.
    npm WARN macbook No README data
    npm WARN macbook No license field.
    Macbooks-MBP:~ Lililashka$ npm uninstall -D package-name
    npm WARN saveError ENOENT: no such file or directory, open '/Users/macbook/package.json'
    npm WARN enoent ENOENT: no such file or directory, open '/Users/macbook/package.json'
    npm WARN macbook No description
    npm WARN macbook No repository field.
    npm WARN macbook No README data
    npm WARN macbook No license field.

在将其安装到项目中之前,需要全局安装
Gulp

sudo npm install -g gulp

您是在本地还是全局安装gulp?