Bower - error when installing package “Arguments to path.join must be strings”

╄→гoц情女王★ 提交于 2019-12-03 23:36:33

Fix: Clear cache and update to Bower 1.3.8.

This is what's going on:

The tmp package updated it's API to return a cleanup callback in addition to just the directory name. Q then squashes the two arguments to the callback into an array, while bower expected just a string for the directory name.

This causes "TypeError: Arguments to path.join must be strings" errors to appear, seemingly non-deterministic, because various spots attempt to use the _tempDir value (now an array) to join into a path.

semver ftw!

For other people who are still running into this, this did the trick for me:

bower cache clean

For me npm install -update bower was not sufficient.

I needed to install the version by specifing it explicit:

sudo npm install -q bower@1.3.8

and yes, I had to run this with sudo.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!