【问题标题】:Node-sass binding problem in Github-ActionsGithub-Actions 中的 Node-sass 绑定问题
【发布时间】:2020-05-19 19:56:39
【问题描述】:

我正在通过以下步骤设置 GitHub 操作

runs-on: ubuntu-latest 
steps:
- uses: actions/checkout@master
- uses: borales/actions-yarn@master
  with:
    cmd: install # will run `yarn install` command
- uses: actions/setup-node@master
  with:
    node-version: '12.x'
- run: npm run build:prod

由于 Node Sass 库上的操作系统不匹配,它在构建应用程序时崩溃

./node_modules/font-awesome-loader/font-awesome.config.js) 模块 构建失败(来自 ./node_modules/sass-loader/dist/cjs.js):错误: 缺少绑定 /home/runner/work/xxx/xxx/node_modules/node-sass/vendor/linux-x64-72/binding.node Node Sass 找不到当前环境的绑定: Linux 64 位 Node.js 12.x

找到以下环境的绑定: - Linux/musl 64 位 Node.js 12.x

npm rebuild node-sass 作为一个步骤运行会导致错误,因为代理没有管理员权限。

知道为什么 Github-Actions 给我的是 linux/musl 而不是 linux?

【问题讨论】:

    标签: node-sass github-actions


    【解决方案1】:

    问题在于混合 yarn 和 npm。我正在使用 yarn 来安装和 npm 来构建。用纱线做这两件事解决了这个问题。

    【讨论】:

      猜你喜欢
      • 2019-09-03
      • 2019-06-24
      • 1970-01-01
      • 2021-06-19
      • 2022-08-11
      • 2020-05-30
      • 1970-01-01
      • 2017-06-16
      • 2023-03-25
      相关资源
      最近更新 更多