npm install github repo strips src文件夹

时间:2016-08-11 12:50:04

标签: node.js github npm

我做了以下事情:

npm install TuningGuide/react-sortable-hoc --save
npm info it worked if it ends with ok
npm info using npm@3.10.5
npm info using node@v6.2.2
npm info git [ 'clone',
npm info git   '--template=/Users/velten/.npm/_git-remotes/_templates',
npm info git   '--mirror',
npm info git   'git://github.com/tuningguide/react-sortable-hoc.git',
npm info git   '/Users/velten/.npm/_git-remotes/git-github-com-tuningguide-react-sortable-hoc-git-78a804e9' ]
npm info git [ 'rev-list', '-n1', 'master' ]
npm info git [ 'clone',
npm info git   '/Users/velten/.npm/_git-remotes/git-github-com-tuningguide-react-sortable-hoc-git-78a804e9',
npm info git   '/var/folders/95/ylk5ht9s24n6xk4rcr6sch4r0000gn/T/npm-22395-24e6f9cc/git-cache-220f34bb/09fb1e0c7d657657b9aa091c018b45aee0ed0662' ]
npm info git [ 'checkout', '09fb1e0c7d657657b9aa091c018b45aee0ed0662' ]
npm info git [ 'submodule', '-q', 'update', '--init', '--recursive' ]
npm info attempt registry request try #1 at 14:18:51
npm http request GET https://registry.npmjs.org/invariant
npm http 304 https://registry.npmjs.org/invariant
npm info lifecycle invariant@2.2.1~preinstall: invariant@2.2.1
npm info lifecycle react-sortable-hoc@0.0.7~preinstall: react-sortable-hoc@0.0.7
npm info linkStuff invariant@2.2.1
npm info linkStuff react-sortable-hoc@0.0.7
npm info lifecycle invariant@2.2.1~install: invariant@2.2.1
npm info lifecycle react-sortable-hoc@0.0.7~install: react-sortable-hoc@0.0.7
npm info lifecycle invariant@2.2.1~postinstall: invariant@2.2.1
npm info lifecycle react-sortable-hoc@0.0.7~postinstall: react-sortable-hoc@0.0.7
typescript-react-mobx-boilerplate@1.0.0 /Users/velten/Websites/typescript-react-mobx-boilerplate
└─┬ react-sortable-hoc@0.0.7  (git://github.com/tuningguide/react-sortable-hoc.git#09fb1e0c7d657657b9aa091c018b45aee0ed0662)
  └── invariant@2.2.1 

npm info ok 

folder

但该文件夹不包含源和构建。为什么呢?

2 个答案:

答案 0 :(得分:1)

您可能需要在package.json中为您的回购设置<%= f.autocomplete_field :school_name, autocomplete_school_name_suggestions_path, 'data-show-no-matches' => false %>

答案 1 :(得分:0)

获取整个repo内容的一个解决方法是从存档中安装,例如(看起来repo被重命名为input_changed_during_request = true;,因为提出了问题)

clauderic/react-sortable-hoc

这会下载$ npm install https://github.com/clauderic/react-sortable-hoc/archive/v0.6.7.tar.gz但不会{g}中未跟踪的src/