在Windows上安装时,node-sass会引发错误

时间:2017-07-30 19:09:13

标签: node.js windows node-sass

我正在和一位在Mac上的朋友一起开展一个前端项目,并且能够在他身边安装和运行node-sass。我正在运行Windows 10,所以当我拉动项目并尝试运行if (isset($_POST['id'], $_POST['add'])) { $stmt = $conn->prepare('UPDATE users SET balance = balance + 5 WHERE id = ?'); if (!$stmt) { die('Prepare failed: '.$conn->error); } $stmt->bindParam('d', $_POST['id']); $result = $stmt->execute(); if (!$result) { die('Execute failed: '.$stmt->error); } } if (isset($_POST['id'], $_POST['substract'])) { // ... } 时,我现在从CI.exe中收到一堆错误,如下所示:

npm install

我已经下载了C ++二进制文件,安装了节点windows-build-tools,我确保CI.exe在PATH中。我的智慧结束了!

我正在运行节点v8.2.1,npm v5.3.0,VS 2017(v15.2,26430.16发布)(安装了C ++构建工具等)

Full npm debug log for running command npm install node-sass from project directory

enter image description here

1 个答案:

答案 0 :(得分:0)

NodeJS v10可以解决此问题,但是新版本也存在相同的问题。

也可以尝试:

npm install -g --unsafe-perm node-sass --save
相关问题