基金会新命令失败,说没有安装npm节点模块

时间:2018-05-04 02:02:25

标签: npm zurb-foundation

我对所有事情都很陌生,道歉。按照https://foundation.zurb.com/sites/docs/installation.html上的说明,我使用NPM全局安装了Foundation CLI。

以下是我的所有版本:

  • NodeJS:10.0.0
  • npm:6.0.0
  • 基础CLI:2.2.5

运行Buttons,我选择一个网站项目,输入其名称,然后选择基本模板。

该命令消失了,但最终提出:

foundation new

在此输出之前,有一些看似相关的东西:

There were some problems during the installation.

 ✓ New project folder created.
 ✗ Node modules not installed. Try running npm install manually.
 ✓ Bower components installed.

我按照说明尝试在项目目录中手动运行make: Entering directory '/home/testproject/testproject/node_modules/gulp-sass/node_modules/node-sass/build' g++ '-DNODE_GYP_MODULE_NAME=libsass' '-DUSING_UV_SHARED=1' '-DUSING_V8_SHARED=1' '-DV8_DEPRECATION_WARNINGS=1' '-D_LARGEFILE_SOURCE' '-D_FILE_OFFSET_BITS=64' '-DLIBSASS_VERSION="3.3.6"' -I/home/testproject/.node-gyp/10.0.0/include/node -I/home/testproject/.node-gyp/10.0.0/src -I/home/testproject/.node-gyp/10.0.0/deps/uv/include -I/home/testproject/.node-gyp/10.0.0/deps/v8/include -I../src/libsass/include -fPIC -pthread -Wall -Wextra -Wno-unused-parameter -m64 -O3 -fno-omit-frame-pointer -std=gnu++1y -std=c++0x -fexceptions -frtti -MMD -MF ./Release/.deps/Release/obj.target/libsass/src/libsass/src/ast.o.d.raw -c -o Release/obj.target/libsass/src/libsass/src/ast.o ../src/libsass/src/ast.cpp g++: internal compiler error: Killed (program cc1plus) Please submit a full bug report, with preprocessed source if appropriate. See <file:///usr/share/doc/gcc-5/README.Bugs> for instructions. src/libsass.target.mk:139: recipe for target 'Release/obj.target/libsass/src/libsass/src/ast.o' failed make: *** [Release/obj.target/libsass/src/libsass/src/ast.o] Error 4 make: Leaving directory '/home/testproject/testproject/node_modules/gulp-sass/node_modules/node-sass/build' gyp ERR! build error gyp ERR! stack Error: `make` failed with exit code: 2 gyp ERR! stack at ChildProcess.onExit (/home/testproject/testproject/node_modules/gulp-sass/node_modules/node-sass/node_modules/node-gyp/lib/build.js:258:23) gyp ERR! stack at ChildProcess.emit (events.js:182:13) gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:225:12) gyp ERR! System Linux 4.4.0-1055-aws gyp ERR! command "/usr/bin/node" "/home/testproject/testproject/node_modules/gulp-sass/node_modules/node-sass/node_modules/node-gyp/bin/node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library=" gyp ERR! cwd /home/testproject/testproject/node_modules/gulp-sass/node_modules/node-sass gyp ERR! node -v v10.0.0 gyp ERR! node-gyp -v v3.6.2 gyp ERR! not ok Build failed with error code: 1 。这会产生大量输出,破坏我终端的历史缓冲区。但一切都以:

结束
npm install

所以看起来同样的问题正在发生。最后一行提到的日志文件是10459行,所以我把它放在gist.github.com上:https://gist.github.com/MadEmperorYuri/b128b3cd62fc77daa25c1a9dcd5c743b

我不确定该怎么做。谢谢!

2 个答案:

答案 0 :(得分:1)

您可以在这里https://github.com/foundation/foundation-sites/issues/11755

使用命令 npx -p node @ 10基础新的--framework电子邮件

答案 1 :(得分:0)

问题是Foundation默认使用gulp-sass@2.1.0,这取决于node-sass@3.0.0。 Npm将此依赖关系解析为node-sass@3.13.1,它与Node v8及更高版本不兼容。

您必须使用最新版本的gulp-sass。只需完成以下步骤即可:

  • 删除node_modules/文件夹
  • 删除package-lock.json文件
  • "gulp-sass": "^2.1.0"中删除package.json
  • 运行npm i gulp-sass --save-dev