【问题标题】:Node Sass error in Angular: Mixins may not be defined within control directives or other mixinsAngular 中的 Node Sass 错误:混入可能未在控制指令或其他混入中定义
【发布时间】:2022-03-10 08:28:56
【问题描述】:

我有一个用 Angular 4 编写的项目,我正在尝试构建它,但我不断收到此错误:Mixins may not be defined within control directives or other mixins.

我在互联网上环顾四周,看到了一些将 node-sass 降级到 4.8.1 版本的建议,但是当我尝试这样做时,我从 Github 收到了 404 错误:

> node-sass@4.8.1 install c:\my-project\node_modules\node-sass
> node scripts/install.js

Downloading binary from https://github.com/sass/node-sass/releases/download/v4.8.1/win32-x64-64_binding.node
Cannot download "https://github.com/sass/node-sass/releases/download/v4.8.1/win32-x64-64_binding.node":

HTTP error 404 Not Found

果然,这个地址:https://github.com/sass/node-sass/releases/download/v4.8.1/win32-x64-64_binding.node 不存在。我的猜测是因为有新版本的 node-sass 可用并且 4.8.1 被推回第二页:https://github.com/sass/node-sass/releases?after=3.5.3

我知道我正在使用一个非常旧版本的 Angular,我计划升级它,但我现在没有时间这样做,有人设法解决了这个问题吗?

【问题讨论】:

    标签: node.js angular sass


    【解决方案1】:

    下载win32-x64-64_binding.node,放到本地:

    C:\Users\{username}\AppData\Roaming\npm-cache\node-sass\4.8.1\
    

    然后重新安装。

    【讨论】:

      猜你喜欢
      • 2016-08-15
      • 2014-08-11
      • 2018-10-05
      • 2019-06-21
      • 1970-01-01
      • 2018-04-17
      • 2023-03-13
      • 1970-01-01
      • 2021-08-23
      相关资源
      最近更新 更多