我想安装/使用Gulp-Plugin unss(https://www.npmjs.com/package/gulp-un-css/)作为我的第一次吞咽 - "尝试"。
因此,我使用CLI version 3.9.1
在全球范围内成功安装了npm和Gulp。我还使用npm install gulp-uncss --save-dev
和sudo npm install gulp-uncss --save-dev
安装了uncss-plugin。
最后,我在终端内收到相同的消息:
SyntaxError: Use of const in strict mode.
at Module._compile (module.js:439:25)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Module.require (module.js:364:17)
at require (module.js:380:17)
at Object.<anonymous> (/Users/me/project/front/node_modules/gulp-uncss/node_modules/uncss/node_modules/phridge/node_modules/phantomjs-prebuilt/node_modules/request/node_modules/hawk/lib/index.js:5:33)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
npm ERR! phantomjs-prebuilt@2.1.16 install: `node install.js`
npm ERR! Exit status 8
npm ERR!
npm ERR! Failed at the phantomjs-prebuilt@2.1.16 install script.
npm ERR! This is most likely a problem with the phantomjs-prebuilt package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node install.js
npm ERR! You can get their info via:
npm ERR! npm owner ls phantomjs-prebuilt
npm ERR! There is likely additional logging output above.
npm ERR! System Darwin 15.3.0
npm ERR! command "node" "/usr/local/bin/npm" "install" "gulp-uncss" "--save-dev"
npm ERR! cwd /Users/me/project
npm ERR! node -v v0.10.31
npm ERR! npm -v 1.4.23
npm ERR! code ELIFECYCLE
npm ERR! Error: ENOENT, lstat '/Users/me/project/node_modules/gulp-uncss/node_modules/uncss/node_modules/request/node_modules/form-data/node_modules/async/node_modules/lodash/throttle.js'
npm ERR! If you need help, you may report this *entire* log,
npm ERR! including the npm and node versions, at:
npm ERR! <http://github.com/npm/npm/issues>
npm ERR! System Darwin 15.3.0
npm ERR! command "node" "/usr/local/bin/npm" "install" "gulp-uncss" "--save-dev"
npm ERR! cwd /Users/me/project
npm ERR! node -v v0.10.31
npm ERR! npm -v 1.4.23
npm ERR! path /Users/me/project/node_modules/gulp-uncss/node_modules/uncss/node_modules/request/node_modules/form-data/node_modules/async/node_modules/lodash/throttle.js
npm ERR! fstream_path /Users/me/project/node_modules/gulp-uncss/node_modules/uncss/node_modules/request/node_modules/form-data/node_modules/async/node_modules/lodash/throttle.js
npm ERR! fstream_type File
npm ERR! fstream_class FileWriter
npm ERR! code ENOENT
npm ERR! errno 34
npm ERR! fstream_stack /usr/local/lib/node_modules/npm/node_modules/fstream/lib/writer.js:284:26
npm ERR! fstream_stack Object.oncomplete (evalmachine.<anonymous>:107:15)
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /Users/me/project/npm-debug.log
npm ERR! not ok code 0
什么/我该如何解决?