purifycss / purifycss

Remove unused CSS. Also works with single-page apps.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Installation issues

JayHoltslander opened this issue · comments

Tried the following commands

$ npm -g purify-css
$ sudo npm -g purify-css
$ npm i -D purify-css

Can't seem to Purifycss to install properly.

$ npm i -D purify-css
npm WARN package.json purifycss@1.0.0 No repository field.
npm WARN engine clean-css@4.1.7: wanted: {"node":">= 4.0"} (current: {"node":"0.12.7","npm":"2.12.1"})
npm WARN engine read-pkg-up@2.0.0: wanted: {"node":">=4"} (current: {"node":"0.12.7","npm":"2.12.1"})
npm WARN engine camelcase@4.1.0: wanted: {"node":">=4"} (current: {"node":"0.12.7","npm":"2.12.1"})
npm WARN engine os-locale@2.1.0: wanted: {"node":">=4"} (current: {"node":"0.12.7","npm":"2.12.1"})
npm WARN engine string-width@2.1.1: wanted: {"node":">=4"} (current: {"node":"0.12.7","npm":"2.12.1"})
npm WARN engine find-up@2.1.0: wanted: {"node":">=4"} (current: {"node":"0.12.7","npm":"2.12.1"})
npm WARN engine read-pkg@2.0.0: wanted: {"node":">=4"} (current: {"node":"0.12.7","npm":"2.12.1"})
npm WARN engine is-fullwidth-code-point@2.0.0: wanted: {"node":">=4"} (current: {"node":"0.12.7","npm":"2.12.1"})
npm WARN engine strip-ansi@4.0.0: wanted: {"node":">=4"} (current: {"node":"0.12.7","npm":"2.12.1"})
npm WARN engine execa@0.7.0: wanted: {"node":">=4"} (current: {"node":"0.12.7","npm":"2.12.1"})
npm WARN engine mem@1.1.0: wanted: {"node":">=4"} (current: {"node":"0.12.7","npm":"2.12.1"})
npm WARN engine locate-path@2.0.0: wanted: {"node":">=4"} (current: {"node":"0.12.7","npm":"2.12.1"})
npm WARN engine ansi-regex@3.0.0: wanted: {"node":">=4"} (current: {"node":"0.12.7","npm":"2.12.1"})
npm WARN engine load-json-file@2.0.0: wanted: {"node":">=4"} (current: {"node":"0.12.7","npm":"2.12.1"})
npm WARN engine path-type@2.0.0: wanted: {"node":">=4"} (current: {"node":"0.12.7","npm":"2.12.1"})
npm WARN engine mimic-fn@1.1.0: wanted: {"node":">=4"} (current: {"node":"0.12.7","npm":"2.12.1"})
npm WARN engine p-finally@1.0.0: wanted: {"node":">=4"} (current: {"node":"0.12.7","npm":"2.12.1"})
npm WARN engine npm-run-path@2.0.2: wanted: {"node":">=4"} (current: {"node":"0.12.7","npm":"2.12.1"})
npm WARN engine get-stream@3.0.0: wanted: {"node":">=4"} (current: {"node":"0.12.7","npm":"2.12.1"})
npm WARN engine path-exists@3.0.0: wanted: {"node":">=4"} (current: {"node":"0.12.7","npm":"2.12.1"})
npm WARN engine p-locate@2.0.0: wanted: {"node":">=4"} (current: {"node":"0.12.7","npm":"2.12.1"})
npm WARN engine strip-bom@3.0.0: wanted: {"node":">=4"} (current: {"node":"0.12.7","npm":"2.12.1"})
npm WARN engine path-key@2.0.1: wanted: {"node":">=4"} (current: {"node":"0.12.7","npm":"2.12.1"})
npm WARN engine p-limit@1.1.0: wanted: {"node":">=4"} (current: {"node":"0.12.7","npm":"2.12.1"})
npm ERR! Darwin 15.6.0
npm ERR! argv "node" "/usr/local/bin/npm" "i" "-D" "purify-css"
npm ERR! node v0.12.7
npm ERR! npm  v2.12.1
npm ERR! code EPEERINVALID

npm ERR! peerinvalid The package grunt does not satisfy its siblings' peerDependencies requirements!
npm ERR! peerinvalid Peer grunt-purifycss@0.1.1 wants grunt@~0.4.5

npm ERR! Please include the following file with any support request:
npm ERR!     /Users/jholtslander/Desktop/remove-unnecessary-css-with-purifycss-and-grunt-master/npm-debug.log

Trying to run purifycss after install results in:

$ purifycss
/usr/local/lib/node_modules/purify-css/node_modules/yargs/node_modules/camelcase/index.js:4
	let isLastCharLower = false;
	^^^
SyntaxError: Unexpected strict mode reserved word
    at exports.runInThisContext (vm.js:73:16)
    at Module._compile (module.js:443:25)
    at Object.Module._extensions..js (module.js:478:10)
    at Module.load (module.js:355:32)
    at Function.Module._load (module.js:310:12)
    at Module.require (module.js:365:17)
    at require (module.js:384:17)
    at Object.<anonymous> (/usr/local/lib/node_modules/purify-css/node_modules/yargs/lib/command.js:3:19)
    at Module._compile (module.js:460:26)
    at Object.Module._extensions..js (module.js:478:10)

Tried posting the log contents as requested but...

commented

You need to have nodejs >= 5 installed

whats the output for node -v and/or nodejs -v

Helpful

Try using nvm for switching versions or nodenv. 0.12 is very old. Current versions are 8 and 9.