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

前端 未结 3 657
醉梦人生
醉梦人生 2021-02-19 07:21

I just created a node project and am trying to install jquery using bower.

bower install jquery

I get the following error:

bowe         


        
3条回答
  •  借酒劲吻你
    2021-02-19 08:09

    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!

提交回复
热议问题