我几天来一直在尝试反复安装bower。安装挂在同一点-
npm verb about to build C:UsersspjbdAppDataRoamingnpmnode_modulesbowerno
de_modulesinsight
npm info build C:UsersspjbdAppDataRoamingnpmnode_modulesbowernode_module
sinsight
npm verb linkStuff [ true,
npm verb linkStuff 'C:\Users\spjbd\AppData\Roaming\npm\node_modules',
npm verb linkStuff false,
npm verb linkStuff 'C:\Users\spjbd\AppData\Roaming\npm\node_modules\bow
er\node_modules' ]
npm info linkStuff insight@0.4.3
npm verb linkBins insight@0.4.3
npm verb linkMans insight@0.4.3
npm verb rebuildBundles insight@0.4.3
npm verb rebuildBundles [ '.bin',
npm verb rebuildBundles 'async',
npm verb rebuildBundles 'chalk',
npm verb rebuildBundles 'configstore',
npm verb rebuildBundles 'inquirer',
npm verb rebuildBundles 'lodash.debounce',
npm verb rebuildBundles 'object-assign',
npm verb rebuildBundles 'os-name',
npm verb rebuildBundles 'tough-cookie' ]
npm info install insight@0.4.3
npm info postinstall insight@0.4.3
npm verb unlock done using C:UsersspjbdAppDataRoamingnpm-cache_locksinsig
ht-46285e0bf21e5a96.lock for C:UsersspjbdAppDataRoamingnpmnode_modulesbow
ernode_modulesinsight
我尝试了几种不同的方法来抵消
- 卸载/重新安装节点
- 更新npm
- 将路径添加到路径变量
- 等等
出现的另一个错误是生成的npm缓存目录出现问题。
对让bower正确运行有什么见解吗?
您正在用node@0.12
尝试此操作吗?如果是的话,你能试试node@0.10.36
吗,这是一个已知的好版本?
设置注册表帮助我挂起安装。只需运行
npm config set registry https://registry.npmjs.org/
不过,您可能需要使用sudo来更改您的配置文件。
我使用的是Windows 10,遇到了类似的问题。对于npm install -g bower
,我没有使用Windows命令提示符,而是使用git-bash命令提示符。它奏效了。