基础项目创建失败并显示 npm ERR! git debian 8.5.0 上的修订列表

Foundation project creation fails with npm ERR! git rev-list on debian 8.5.0

我找了将近两三个小时。 但是要么我太笨找不到解决方案,要么到目前为止 none。

第一件事:我不是 linux 世界的专业人士,但这就是我得到的。

作为 VirtualBox 映像的裸 debian 8.5.0 安装:

我安装了 sudo、VBoxGuestAdditions、nodejs (v6.2.1)、git 和 foundation-cli(v6)。

所以,现在如果我尝试使用 "foundation new" 创建一个新的基础项目 和 select "ZURB-template"-选项,安装失败并出现以下错误。

npm ERR! git rev-list -n1 4.0: fatal: ambiguous argument '4.0': unknown revision or path not in the working tree.
npm ERR! git rev-list -n1 4.0: Use '--' to separate paths from revisions, like this:
npm ERR! git rev-list -n1 4.0: 'git <command> [<revision>...] -- [<file>...]'
npm ERR! git rev-list -n1 4.0:
npm ERR! git rev-list -n1 4.0: fatal: ambiguous argument '4.0': unknown revision or path not in the working tree.
npm ERR! git rev-list -n1 4.0: Use '--' to separate paths from revisions, like this:
npm ERR! git rev-list -n1 4.0: 'git <command> [<revision>...] -- [<file>...]'
npm ERR! git rev-list -n1 4.0:
npm ERR! git clone --template=/home/dev/.npm/_git-remotes/_templates --mirror git@github.com:gulpjs/gulp-cli.git /home/dev/.npm/_git-remotes/git-github-com-gulpjs-gulp-cli-git-15c23bd3: Cloning into bare repository '/home/dev/.npm/_git-remotes/git-github-com-gulpjs-gulp-cli-git-15c23bd3'...
npm ERR! git clone --template=/home/dev/.npm/_git-remotes/_templates --mirror git@github.com:gulpjs/gulp-cli.git /home/dev/.npm/_git-remotes/git-github-com-gulpjs-gulp-cli-git-15c23bd3: Permission denied (publickey).
npm ERR! git clone --template=/home/dev/.npm/_git-remotes/_templates --mirror git@github.com:gulpjs/gulp-cli.git /home/dev/.npm/_git-remotes/git-github-com-gulpjs-gulp-cli-git-15c23bd3: fatal: Could not read from remote repository.
npm ERR! git clone --template=/home/dev/.npm/_git-remotes/_templates --mirror git@github.com:gulpjs/gulp-cli.git /home/dev/.npm/_git-remotes/git-github-com-gulpjs-gulp-cli-git-15c23bd3:
npm ERR! git clone --template=/home/dev/.npm/_git-remotes/_templates --mirror git@github.com:gulpjs/gulp-cli.git /home/dev/.npm/_git-remotes/git-github-com-gulpjs-gulp-cli-git-15c23bd3: Please make sure you have the correct access rights
npm ERR! git clone --template=/home/dev/.npm/_git-remotes/_templates --mirror git@github.com:gulpjs/gulp-cli.git /home/dev/.npm/_git-remotes/git-github-com-gulpjs-gulp-cli-git-15c23bd3: and the repository exists.

也许我在这里遗漏了一些重要的东西,所以即使是最简单的建议也不要犹豫。如果我没有对此进行正确的搜索,或者即使它在我面前也愚蠢地得到了解决方案,请 :D

/编辑

小更新: 我在我的计算机上发现了一个基于 debian 的 bunsenlabs vm(以前的 crunchbang)的安装。在这里安装和创建一个基础项目就像魅力一样。

所以我想,让我们用 bunsenlabs 安装一个新的虚拟机,然后再试一次。 因为它适用于旧安装,所以它应该适用于新安装,对吗? 错误...我无法解决这个问题。我很确定我没有对旧安装做任何特别的事情...

我不知道为什么这对我有用,但请尝试安装 babel-register:

npm i babel-register

我遇到了同样的问题并且能够用这个解决它:

从 npm 配置中删除 grunt-cli 版本修复了这个问题。 Packjage json 应该有这样的 grunt-cli 行:

{
...
"devDependencies": {
...
"gulp-cli": "gulpjs/gulp-cli",
...
},
...
}

我们也 运行 解决了这个问题,并提出了与 Jeff 相同的解决方案。如果经验不足的人正在寻找更多方向,请按以下步骤进行:

  1. 编辑 package.json 文件,在 devDependencies 下更改 "gulp": "gulpjs/gulp#4.0", 到 "gulp": "gulpjs/gulp”, and "gulp- cli": "gulpjs/gulp-cli#4.0” to "gulp-cli": "gulpjs/gulp-cli" (删除 #4.0 似乎有帮助)
  2. 运行 npm 安装
  3. 如果需要 运行 npm install graceful-fs(在 4.x b运行ch 上)
  4. 运行 npm install –g "gulpjs/gulp#4.0"
  5. 运行 npm install "gulpjs/gulp#4.0" (确保你的本地环境使用 4.0 b运行ch)
  6. Gulp –v(以确保您的本地环境正在使用 4.x b运行ch)
  7. 运行 gem 安装 sass
  8. 运行 凉亭安装
  9. 运行 npm 重建节点-sass
  10. 运行 npm 开始
  11. 必要时使用 sudo

干杯