我正在尝试将 grunt-phantomcss 安装到我的应用程序,但出现以下错误:
C:\test>npm install grunt-phantomcss --save-dev
npm WARN package.json cgmbase@0.0.0 No repository field.
|
> grunt-phantomcss@0.2.3 postinstall C:\test\node_modules\grunt-phantom
css
> node ./node_modules/bower/bin/bower install
bower not-cached git://github.com/Huddle/PhantomCSS.git#f0846511d9e1e55aa160a
aab84e2a150bd3a5a41
bower resolve git://github.com/Huddle/PhantomCSS.git#f0846511d9e1e55aa160a
aab84e2a150bd3a5a41
bower checkout phantomcss#f0846511d9e1e55aa160aaab84e2a150bd3a5a41
bower error Arguments to path.join must be strings
Stack trace:
TypeError: Arguments to path.join must be strings
at f (path.js:204:15)
at Object.filter (native)
at Object.exports.join (path.js:209:40)
at GitHubResolver.GitResolver._cleanup (C:\test\node_modules\grunt-
phantomcss\node_modules\bower\lib\core\resolvers\GitResolver.js:158:26)
at C:\test\node_modules\grunt-phantomcss\node_modules\bower\lib\cor
e\resolvers\GitResolver.js:66:25
at Promise.apply (C:\test\node_modules\q\q.js:1122:26)
at Promise.promise.promiseDispatch (C:\test\node_modules\q\q.js:752
:41)
at C:\test\node_modules\q\q.js:1337:14
at flush (C:\test\node_modules\q\q.js:108:17)
at process._tickCallback (node.js:419:13)
Console trace:
Trace
at StandardRenderer.error (C:\test\node_modules\grunt-phantomcss\no
de_modules\bower\lib\renderers\StandardRenderer.js:69:17)
at Logger.updateNotifier.packageName (C:\test\node_modules\grunt-ph
antomcss\node_modules\bower\bin\bower:113:18)
at Logger.emit (events.js:95:17)
at Logger.emit (C:\test\node_modules\grunt-phantomcss\node_modules\
bower\node_modules\bower-logger\lib\Logger.js:29:39)
at C:\test\node_modules\grunt-phantomcss\node_modules\bower\lib\com
mands\install.js:25:16
at _rejected (C:\test\node_modules\q\q.js:808:24)
at C:\test\node_modules\q\q.js:834:30
at Promise.when (C:\test\node_modules\q\q.js:1079:31)
at Promise.promise.promiseDispatch (C:\test\node_modules\q\q.js:752
:41)
at C:\test\node_modules\q\q.js:574:44
System info:
Bower version: 1.0.3
Node version: 0.10.32
OS: Windows_NT 6.1.7601 x64
npm ERR! grunt-phantomcss@0.2.3 postinstall: `node ./node_modules/bower/bin/bowe
r install`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the grunt-phantomcss@0.2.3 postinstall script.
npm ERR! This is most likely a problem with the grunt-phantomcss package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node ./node_modules/bower/bin/bower install
npm ERR! You can get their info via:
npm ERR! npm owner ls grunt-phantomcss
npm ERR! There is likely additional logging output above.
npm ERR! System Windows_NT 6.1.7601
npm ERR! command "C:\\Program Files\\nodejs\\\\node.exe" "C:\\Program Files\\nod
ejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "grunt-phantomcss" "--save-de
v"
npm ERR! cwd C:\test
npm ERR! node -v v0.10.32
npm ERR! npm -v 1.4.28
npm ERR! code ELIFECYCLE
npm ERR! not ok code 0
有谁知道我能做些什么来解决这个问题?我试图清理 bower 和 npm 缓存,但我得到了同样的错误。