gpt4 book ai didi

node.js - npm install 在 node-sass 中抛出错误

转载 作者:行者123 更新时间:2023-12-02 00:15:29 25 4
gpt4 key购买 nike

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

到目前为止我尝试过:

  • npm 重建
  • npm 重建node-sass
  • npm uninstall -g node-sass
  • rm -rf node_module
  • 最佳答案

    1. package.json 中删除“node-sass”依赖项
    2. 运行npm install
    3. 运行npm i sass
    4. 运行npm start

    你准备好了! :)

    关于node.js - npm install 在 node-sass 中抛出错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45589179/

    25 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com