node.js - Laravel - 为什么节点模块加载器指的是不在我网站上的 node-sass 版本?
问题描述
我正在本地环境(MAC Sierra)上进行一些开发,当我的网站加载时,我不断收到此错误:
throw new Error("Module build failed: ModuleBuildError: Module build failed: Error: Node Sass does not yet support your current environment: OS X 64-bit with Unsupported runtime (67)\nFor more information on which environments are supported please see:\nhttps://github.com/sass/node-sass/releases/tag/v4.5.3\n
我已阅读有关此错误的信息。我正在运行 node v 8.2.1 并根据我的操作系统环境将 node-sass 更新到 4.12。
在我的node_modules
文件夹中,没有 4.5.3 版本的 node-sass 文件夹。即使我删除该node-sass
文件夹,我仍然会收到此错误。如果我清除缓存,我仍然会收到此错误。我只是无法弄清楚这个 node-sass 4.5.3 将在 laravel 应用程序中的哪个位置加载。
我已经尝试重建 node-sass。关于这个问题,我已经尝试了十几种建议。但我的应用程序似乎仍然认为我有node-sass 4.5.3
......
想法?
谢谢,布赖恩
解决方案
你应该删除 node_modules 文件夹,packages-lock.json 文件然后运行:
npm cache clear --force
npm install
npm rebuild node-sass
推荐阅读
- google-sheets - (已解决)Google 表格 Forumla - 如何使用 2 列中的数据获取每行的唯一总和?
- python - 该功能不会将用户重定向到下一个问题
- node.js - 我正在尝试从 gcs 向客户端显示多个签名的 url,但我不知道如何将 console.log 更改为有效的东西
- django - Django过滤器startswith在本地工作,但在heroku上不工作
- highcharts - 将 JSON 对象从 API 转换为 Highcharts 格式的插件
- sql - SQL - SELECT 语句优先级(查询与子查询)
- c# - C#:在 C# 中返回数组中的选定元素
- windows - Android Studio 和模拟器没有响应
- node.js - npm install quick.db 需要永远
- typescript - Firebase实时数据库如何添加具有自动ID的孩子