【发布时间】:2018-01-17 06:07:01
【问题描述】:
node-sass@2.1.1 install /home/user/Documents/project/node_modules/node-sass
> node scripts/install.js
WARN invalid config loglevel="notice"
Can not download file from https://raw.githubusercontent.com/sass/node-sass-binaries/v2.1.1/linux-x64-node-8.2/binding.node
> node-sass@2.1.1 postinstall /home/user/Documents/project/node_modules/node-sass
> node scripts/build.js
module.js:487
throw err;
^
Error: Cannot find module '/home/user/Documents/project/node_modules/node-sass/node_modules/pangyp/bin/node-gyp'
at Function.Module._resolveFilename (module.js:485:15)
at Function.Module._load (module.js:437:25)
at Function.Module.runMain (module.js:605:10)
at startup (bootstrap_node.js:158:16)
at bootstrap_node.js:575:3
Build failed
added 2186 packages in 42.166s
到目前为止我试过了:
【问题讨论】:
-
看来你需要安装
node-gyp。npm install -g node-gyp -
node-sass@2.1.1严重过时(我尝试安装它并能够重现错误);您可以尝试编辑package.json以改用最新版本。 (删除@2.1.1)