【问题标题】:npm install hang on Mac OS X on Laravel 5 Projectnpm install 在 Laravel 5 项目的 Mac OS X 上挂起
【发布时间】:2018-08-05 03:05:41
【问题描述】:

环境

⚡️  node -v                                                                                                                   
v8.9.4                                                                                                                              
⚡️  npm -v                                                                                                                    
5.6.0                                                                                                                               
⚡️  php -v                                                                                                                    
PHP 7.1.4 (cli) (built: May  6 2017 10:02:00) ( NTS )                                                                               
Copyright (c) 1997-2017 The PHP Group                                                                                               
Zend Engine v3.1.0, Copyright (c) 1998-2017 Zend Technologies                                                                       
    with Zend OPcache v7.1.4, Copyright (c) 1999-2017, by Zend Technologies                                                         

Mac OS X 10.12.6

我的package.json上有这个

{
  "private": true,
  "devDependencies": {
    "grunt": "^1.0.1",
    "grunt-contrib-clean": "^1.0.0",
    "grunt-contrib-compress": "^1.4.1",
    "grunt-contrib-concat": "^1.0.1",
    "grunt-contrib-cssmin": "^1.0.2",
    "grunt-contrib-htmlmin": "^1.5.0",
    "grunt-contrib-uglify": "^1.0.2",
    "grunt-contrib-watch": "^1.0.0",
    "grunt-critical-css": "^0.1.3",
    "grunt-penthouse": "^0.3.0",
    "gulp": "^3.9.1",
    "laravel-elixir": "*"
  },
  "dependencies": {
    "angular-ckeditor": "^0.3.1",
    "grunt": "^1.0.1",
    "ng-tags-input": "^3.2.0"
  },
  "name": "gg-web-app",
  "version": "1.0.0",
  "main": "Gruntfile.js",
  "directories": {
    "test": "tests"
  },
  "scripts": {
    "test": "echo \"Error: no test specified\" && exit 1"
  },
  "repository": {
    "type": "git",
    "url": "git+ssh://git@bitbucket.org/gg-web-app.git"
  },
  "author": "",
  "license": "ISC",
  "homepage": "https://bitbucket.org/gg-web-app#readme",
  "description": ""
}

我运行 npm install

我一直得到

> fsevents@1.1.3 install /Users/jdoe/Sites/jdoe/node_modules/fsevents
> node install

[fsevents] Success: "/Users/jdoe/Sites/jdoe/node_modules/fsevents/lib/binding/Release/node-v57-darwin-x64/fse.node" already installed
Pass --update-binary to reinstall or --build-from-source to recompile
                                                                                                                                   
> phantomjs@1.9.11 install /Users/jdoe/Sites/jdoe/node_modules/phantomjs
> node install.js

WARN invalid config loglevel="notice"
Download already available at /var/folders/54/y_678c6n7q7_pgk1v5lkzwnr0000gp/T/phantomjs/phantomjs-1.9.7-macosx.zip
Extracting zip contents
Removing /Users/jdoe/Sites/jdoe/node_modules/phantomjs/lib/phantom
Copying extracted folder /var/folders/54/y_678c6n7q7_pgk1v5lkzwnr0000gp/T/phantomjs/phantomjs-1.9.7-macosx.zip-extract-1519572779384/phantomjs-1.9.7-macosx -> /Users/jdoe/Sites/jdoe/node_modules/phantomjs/lib/phantom

为什么它与 phantomjs 的东西有关?

为什么会挂这么久?

是因为我上网吗?

我不认为我在 package.json 中使用了太复杂的东西。

【问题讨论】:

    标签: angularjs laravel laravel-5 npm node-modules


    【解决方案1】:

    我已经在 npm 3.5.2node v8.2.1 和 Linux Ubuntu 17.10 上测试了您的 package.json。它挂在同一点上:

    Downloading https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-1.9.7-linux-x86_64.tar.bz2
    Saving to /tmp/phantomjs/phantomjs-1.9.7-linux-x86_64.tar.bz2
    Receiving...
      [====================================----] 89% 0.0s
    Received 12852K total.
    Extracting tar contents (via spawned process)
    Removing /home/***/Coding/test/node_modules/phantomjs/lib/phantom
    Copying extracted folder /tmp/phantomjs/phantomjs-1.9.7-linux-x86_64.tar.bz2-extract-1519592594804/phantomjs-1.9.7-linux-x86_64 -> /home/***/Coding/test/node_modules/phantomjs/lib/phantom
    

    考虑在https://github.com/ariya/phantomjs/issues写一个问题

    可能的解决方案是 npm update 或检查 npm outdated 并手动更新到新版本的依赖项。就我而言,我有以下建议:

    Package                 Current  Wanted  Latest     Location   
    grunt-contrib-cssmin    1.0.2    1.0.2   2.2.1      gg-web-app
    grunt-contrib-htmlmin   1.5.0    1.5.0   2.4.0      gg-web-app
    grunt-contrib-uglify    1.0.2    1.0.2   3.3.0      gg-web-app
    grunt-penthouse         0.3.0    0.3.0   0.4.0      gg-web-app
    laravel-elixir          5.0.0    5.0.0   6.0.0-17   gg-web-app
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2023-04-04
      • 2014-07-08
      • 2012-08-22
      • 2017-05-21
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多