使用NPM安装Bootstrap 4的问题

时间:2015-11-20 16:02:54

标签: node.js twitter-bootstrap npm

我正在尝试安装最新的Bootstrap 4 alpha来处理我的OS X系统上的源文件。

我遵循本指南:http://v4-alpha.getbootstrap.com/getting-started/build-tools/#tooling-setup

不幸的是,当我运行npm install命令时,我遇到了多个错误,并且它没有正确安装。 这是第一个错误发生时输出的一部分:

> node postinstall

Installing native dependencies (this may take up to a minute)
npm WARN addRemoteGit Error: Command failed: git config --get remote.origin.url
npm WARN addRemoteGit 
npm WARN addRemoteGit     at ChildProcess.exithandler (child_process.js:751:12)
npm WARN addRemoteGit     at ChildProcess.emit (events.js:110:17)
npm WARN addRemoteGit     at maybeClose (child_process.js:1015:16)
npm WARN addRemoteGit     at Socket.<anonymous> (child_process.js:1183:11)
npm WARN addRemoteGit     at Socket.emit (events.js:107:17)
npm WARN addRemoteGit     at Pipe.close (net.js:485:12)
npm WARN addRemoteGit  git+https://github.com/rynomad/jsbn.git resetting remote /Users/apple/.npm/_git-remotes/https-github-com-rynomad-jsbn-git-fe54fe73 because of error: { [Error: Command failed: git config --get remote.origin.url
npm WARN addRemoteGit ]
npm WARN addRemoteGit   killed: false,
npm WARN addRemoteGit   code: 1,
npm WARN addRemoteGit   signal: null,
npm WARN addRemoteGit   cmd: 'git config --get remote.origin.url' }
-
> node-sass@3.4.2 install /Applications/XAMPP/xamppfiles/htdocs/bootstrap/bootstrap/node_modules/grunt-sass/node_modules/node-sass
> node scripts/install.js

Cannot download "https://github.com/sass/node-sass/releases/download/v3.4.2/darwin-x64-_binding.node": 

HTTP error 404 

Hint: If github.com is not accessible in your location
      try setting a proxy via HTTP_PROXY, e.g. 

      export HTTP_PROXY=http://example.com:1234

or configure npm proxy via

      npm config set proxy http://example.com:8080

> node-sass@3.4.2 postinstall /Applications/XAMPP/xamppfiles/htdocs/bootstrap/bootstrap/node_modules/grunt-sass/node_modules/node-sass
> node scripts/build.js

Building: /opt/local/bin/node /Applications/XAMPP/xamppfiles/htdocs/bootstrap/bootstrap/node_modules/grunt-sass/node_modules/node-sass/node_modules/node-gyp/bin/node-gyp.js rebuild --verbose --libsass_ext= --libsass_cflags= --libsass_ldflags= --libsass_library=

404错误有点可疑。当我转到所述网址(https://github.com/sass/node-sass/releases/download/v3.4.2/darwin-x64-_binding.node)时,确实会出现404错误。这不是故意的,对吧? 然后它会持续一段时间,直到:

gyp info spawn make
gyp info spawn args [ 'V=1', 'BUILDTYPE=Release', '-C', 'build' ]
  g++ '-DNODE_GYP_MODULE_NAME=libsass' '-D_DARWIN_USE_64_BIT_INODE=1' '-D_LARGEFILE_SOURCE' '-D_FILE_OFFSET_BITS=64' '-DLIBSASS_VERSION="3.3.2"' -I/Users/apple/.node-gyp/0.8.16/include/node -I/Users/apple/.node-gyp/0.8.16/src -I/Users/apple/.node-gyp/0.8.16/deps/uv/include -I/Users/apple/.node-gyp/0.8.16/deps/v8/include -I../src/libsass/include  -Os -gdwarf-2 -mmacosx-version-min=10.7 -arch x86_64 -Wall -Wendif-labels -W -Wno-unused-parameter -std=c++11 -stdlib=libc++ -fno-threadsafe-statics -fno-strict-aliasing -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
cc1plus: error: unrecognized command line option "-std=c++11"
cc1plus: error: unrecognized command line option "-stdlib=libc++"
make: *** [Release/obj.target/libsass/src/libsass/src/ast.o] Error 1
gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/Applications/XAMPP/xamppfiles/htdocs/bootstrap/bootstrap/node_modules/node-gyp/lib/build.js:270:23)
gyp ERR! stack     at ChildProcess.EventEmitter.emit (events.js:99:17)
gyp ERR! stack     at Process._handle.onexit (child_process.js:678:10)
gyp ERR! System Darwin 10.8.0
gyp ERR! command "/opt/local/bin/node" "/Applications/XAMPP/xamppfiles/htdocs/bootstrap/bootstrap/node_modules/node-gyp/bin/node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library="
gyp ERR! cwd /Applications/XAMPP/xamppfiles/htdocs/bootstrap/bootstrap/node_modules/node-sass
gyp ERR! node -v v0.8.16
gyp ERR! node-gyp -v v3.1.0
gyp ERR! not ok 
Build failed
npm ERR! Darwin 10.8.0
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install"
npm ERR! node v5.1.0
npm ERR! npm  v3.3.12
npm ERR! code ELIFECYCLE

npm ERR! node-sass@3.4.2 postinstall: `node scripts/build.js`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the node-sass@3.4.2 postinstall script 'node scripts/build.js'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the node-sass package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node scripts/build.js
npm ERR! You can get their info via:
npm ERR!     npm owner ls node-sass
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /Applications/XAMPP/xamppfiles/htdocs/bootstrap/bootstrap/npm-debug.log

然后停止。而且我没有得到最后提到的日志文件。

任何想法可能是什么问题?

0 个答案:

没有答案