⚡️ 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中没有使用太复杂的东西。
答案 0 :(得分:2)
我已在package.json
,npm 3.5.2
和Linux Ubuntu 17.10上测试了您的node v8.2.1
。它坚持在同一点:
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