电子邮件的基础无法创建带有 npm 错误的新项目
foundation for emails can't create new project with npm error
我是 Foundation 的新手,正在尝试开始使用电子邮件 sass 版本的 Foundation。我用这个版本通过 npm 在全球范围内安装了 foundation-cli:
Foundation CLI version 2.2.5
然后我 cd 到一个空文件夹并尝试通过以下命令启动测试项目
foundation new --framework emails
项目设置失败:
Downloading the project template... Done downloading!
Installing dependencies...
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 [...] --
[...]' npm ERR! git rev-list -n1 4.0:
There were some problems during the installation.
✓ New project folder created. ✗ Node modules not installed. Try
running npm install manually. ✓ Bower components installed.
所以我 cd 到新创建的项目文件夹和 npm 安装。还是失败了。
npm ERR! code 1 npm ERR! Command failed: /usr/bin/git checkout 4.0 npm
ERR! error: pathspec '4.0' did not match any file(s) known to git. npm
谁能告诉我如何解决它?
我有同样的错误。
首先按照这些步骤手动安装 gulp
https://gulpjs.org/getting-started.html.
然后,如果您收到一条错误消息,提示未安装 VCBuildtools。通过
安装它们
choco install vcbuildtools
之后它应该可以工作了。
问题是 Gulp 曾经有一个 4.0 标签,但它被删除了。只需 运行 npm i gulp@next --save-dev
或 npm i gulp@4.0.0 --save-dev
.
已在 https://github.com/zurb/foundation-zurb-template/commit/a4472d7fc2409b43bbdc4df4dead7eb5e8e0e691 中修复(参见 package.json 中的更改)。
从这里尝试手动安装:
https://github.com/zurb/foundation-emails-template#manual-setup
使用 Yarn 代替 npm
在几台不同的机器上为我工作。
我是 Foundation 的新手,正在尝试开始使用电子邮件 sass 版本的 Foundation。我用这个版本通过 npm 在全球范围内安装了 foundation-cli:
Foundation CLI version 2.2.5
然后我 cd 到一个空文件夹并尝试通过以下命令启动测试项目
foundation new --framework emails
项目设置失败:
Downloading the project template... Done downloading!
Installing dependencies...
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 [...] -- [...]' npm ERR! git rev-list -n1 4.0:
There were some problems during the installation.
✓ New project folder created. ✗ Node modules not installed. Try running npm install manually. ✓ Bower components installed.
所以我 cd 到新创建的项目文件夹和 npm 安装。还是失败了。
npm ERR! code 1 npm ERR! Command failed: /usr/bin/git checkout 4.0 npm ERR! error: pathspec '4.0' did not match any file(s) known to git. npm
谁能告诉我如何解决它?
我有同样的错误。
首先按照这些步骤手动安装 gulp https://gulpjs.org/getting-started.html.
然后,如果您收到一条错误消息,提示未安装 VCBuildtools。通过
安装它们choco install vcbuildtools
之后它应该可以工作了。
问题是 Gulp 曾经有一个 4.0 标签,但它被删除了。只需 运行 npm i gulp@next --save-dev
或 npm i gulp@4.0.0 --save-dev
.
已在 https://github.com/zurb/foundation-zurb-template/commit/a4472d7fc2409b43bbdc4df4dead7eb5e8e0e691 中修复(参见 package.json 中的更改)。
从这里尝试手动安装: https://github.com/zurb/foundation-emails-template#manual-setup
使用 Yarn 代替 npm
在几台不同的机器上为我工作。