fex-team / fis-command-install

fis install command.
MIT License
4 stars 11 forks source link

安装组件时出错 #5

Open ystarlongzi opened 8 years ago

ystarlongzi commented 8 years ago

component.json 配置文件如下:

{
  "dependencies": [
    "github:fis-components/antd@0.12.12",
    "github:fis-components/redux@3.3.1",
    "github:fis-components/react@15.0.1",
    "github:fis-components/react-router@2.0.0",
    "github:fis-components/react-router-redux@4.0.0",
    "github:fis-components/react-redux@v4.0.0",
    "github:fis-components/redux-thunk@v1.0.0",
    "github:fis-components/immutable@3.7.6",
    "github:fis-components/reqwest@2.0.5"
  ]
}

当运行 fis3 install 时,会提示以下错误:

/usr/local/lib/node_modules/fis3/node_modules/fis-command-install/install.js:278 bar.update(percent); ^

TypeError: bar.update is not a function at progress (/usr/local/lib/node_modules/fis3/node_modules/fis-command-install/install.js:278:21) at ClientRequest. (/usr/local/lib/node_modules/fis3/node_modules/fis-scaffold-kernel/lib/util.js:227:21) at ClientRequest.g (events.js:260:16) at emitOne (events.js:77:13) vat ClientRequest.emit (events.js:169:7) at HTTPParser.parserOnIncomingClient as onIncoming at HTTPParser.parserOnHeadersComplete (_http_common.js:88:23) at TLSSocket.socketOnData (_http_client.js:315:20) at emitOne (events.js:77:13) at TLSSocket.emit (events.js:169:7) at readableAddChunk (_stream_readable.js:146:16) at TLSSocket.Readable.push (_stream_readable.js:110:10) at TLSWrap.onread (net.js:523:20)

不知道具体原因是怎么造成的,只在本地将这段代码修改为如下,然后就可以继续安装组件了

bar.update && bar.update(percent);

补充:发现 github 上对应的代码是 275 行,而本地的安装包确是 278 行

另外,还有一个点,感觉在用 fis3 install 安装组件时,不大稳定,经常会一直在 analyzing dependencies,但是用 npm install 对应的文件时,却很顺利,不知道什么原因。

ystarlongzi commented 8 years ago

fis 的版本是 v3.3.29,然后也有重新安装 fis-command-install 包,也是同样的问题