【问题标题】:npm install -g ionic not installing in windows 8.1npm install -g ionic 未安装在 Windows 8.1 中
【发布时间】:2016-04-20 04:31:43
【问题描述】:

我是 ionic 框架的新手,在尝试安装 ionic 时遇到错误。

我已经安装了 apache-ant、nodejs、cordova,但是当我尝试安装 ionic 时,它会抛出如下错误。

操作系统 windows 8.1 64 位。

请指导我安装这个离子。

\node-sass\build\binding.sln" (default target) (1) ->
(_src_\libsass target) ->
  ..\..\src\libsass\include\sass/base.h(18): fatal error C1083: Cannot open inc
lude file: 'stdbool.h': No such file or directory [C:\Users\guru.ramachandran\A
ppData\Roaming\npm\node_modules\ionic\node_modules\node-sass\build\binding.sln]
  ..\..\src\libsass\include\sass/base.h(18): fatal error C1083: Cannot open inc
lude file: 'stdbool.h': No such file or directory [C:\Users\guru.ramachandran\A
ppData\Roaming\npm\node_modules\ionic\node_modules\node-sass\build\binding.sln]
  c:\users\guru.ramachandran\appdata\roaming\npm\node_modules\ionic\node_module
s\node-sass\src\libsass\src\units.hpp(10): error C2668: 'acos' : ambiguous call
 to overloaded function [C:\Users\guru.ramachandran\AppData\Roaming\npm\node_mo
dules\ionic\node_modules\node-sass\build\binding.sln]
  c:\users\guru.ramachandran\appdata\roaming\npm\node_modules\ionic\node_module
s\node-sass\src\libsass\src\ast.hpp(12): fatal error C1083: Cannot open include
 file: 'unordered_map': No such file or directory [C:\Users\guru.ramachandran\A
ppData\Roaming\npm\node_modules\ionic\node_modules\node-sass\build\binding.sln]
  c:\users\guru.ramachandran\appdata\roaming\npm\node_modules\ionic\node_module
s\node-sass\src\libsass\src\ast.hpp(12): fatal error C1083: Cannot open include
 file: 'unordered_map': No such file or directory [C:\Users\guru.ramachandran\A
ppData\Roaming\npm\node_modules\ionic\node_modules\node-sass\build\binding.sln]
  ..\..\src\libsass\include\sass/values.h(5): fatal error C1083: Cannot open in
clude file: 'stdbool.h': No such file or directory [C:\Users\guru.ramachandran\
AppData\Roaming\npm\node_modules\ionic\node_modules\node-sass\build\binding.sln

【问题讨论】:

  • 尝试使用 sudo npm install ionic -g
  • @MohanGopi 该命令不适用于 windows。

标签: ionic-framework


【解决方案1】:

问题是关于node-gyp 模块,他们说此时需要VS2013-VS2015 来构建组件,在他们的README 文件中,他们说

选项 1

使用 Microsoft 安装所有必需的工具和配置 使用

的 windows-build-tools

npm install --global --production windows-build-tools

来自提升的 PowerShell 或 CMD.exe(运行为 管理员)。

选项 2

手动安装工具和配置:

Visual C++ 构建环境:

选项 1:使用默认安装安装 Visual C++ 构建工具 选项。

选项 2:安装 Visual Studio 2015(或修改现有的 安装)并在安装过程中选择 Visual C++ 的常用工具。 这也适用于免费的 Community 和 Express for Desktop 版本。

[仅限 Windows Vista / 7] 需要 .NET Framework 4.5.1 安装 Python 2.7(不支持 v3.x.x),并运行 npm config set python python2.7(或参见下文以获取有关指定 正确的 Python 版本和路径。)

启动cmd,npm config set msvs_version 2015

来源:https://github.com/nodejs/node-gyp

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2018-10-29
    • 2017-02-18
    • 2017-03-20
    • 2017-11-09
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多