symfony/encore: 隐藏依赖警告
symfony/encore: Hide warning of dependency
我正在努力隐藏来自我无法修复的依赖项的警告。
我尝试过的事情:
- 配置 webpack 配置
stats
选项;但我后来看到 Encore 基本上已经禁用了警告输出(当查看 Encore.getWebpackConfig()
的输出时)。
- 为encore使用的
friendly-errors-plugin
写一个转换器;将我不想看到的警告设置为 null
。然而,在转换之后 null
值没有被过滤掉,导致崩溃(有点道理,因为它们不是过滤器;但值得一试)
让我感到困惑的是,显然 friendly-errors-webpack-plugin
从 webpack 输出 see source 获取输入,但即使我使用 stats: false
.[=20 禁用全部,警告仍然出现=]
简而言之;我怎样才能隐藏这个警告:
WARNING Compiled with 1 warnings 8:44:25 AM
warning in ./node_modules/moment/locale/en-SG.js
There are multiple modules with names that only differ in casing.
This can lead to unexpected behavior when compiling on a filesystem with other case-semantic.
Use equal casing. Compare these module identifiers:
* /home/famoser/Repos/mangelio/web/node_modules/moment/locale/en-SG.js
Used by 2 module(s), i. e.
/home/famoser/Repos/mangelio/web/node_modules/moment/locale sync /^\.\/.*$/
* /home/famoser/Repos/mangelio/web/node_modules/moment/locale/en-sg.js
Used by 2 module(s), i. e.
/home/famoser/Repos/mangelio/web/node_modules/moment/locale sync /^\.\/.*$/
是的,删除文件夹 node_modules 并安装 yarn/npm 解决了问题,谢谢!
我正在努力隐藏来自我无法修复的依赖项的警告。
我尝试过的事情:
- 配置 webpack 配置
stats
选项;但我后来看到 Encore 基本上已经禁用了警告输出(当查看Encore.getWebpackConfig()
的输出时)。 - 为encore使用的
friendly-errors-plugin
写一个转换器;将我不想看到的警告设置为null
。然而,在转换之后null
值没有被过滤掉,导致崩溃(有点道理,因为它们不是过滤器;但值得一试)
让我感到困惑的是,显然 friendly-errors-webpack-plugin
从 webpack 输出 see source 获取输入,但即使我使用 stats: false
.[=20 禁用全部,警告仍然出现=]
简而言之;我怎样才能隐藏这个警告:
WARNING Compiled with 1 warnings 8:44:25 AM
warning in ./node_modules/moment/locale/en-SG.js
There are multiple modules with names that only differ in casing.
This can lead to unexpected behavior when compiling on a filesystem with other case-semantic.
Use equal casing. Compare these module identifiers:
* /home/famoser/Repos/mangelio/web/node_modules/moment/locale/en-SG.js
Used by 2 module(s), i. e.
/home/famoser/Repos/mangelio/web/node_modules/moment/locale sync /^\.\/.*$/
* /home/famoser/Repos/mangelio/web/node_modules/moment/locale/en-sg.js
Used by 2 module(s), i. e.
/home/famoser/Repos/mangelio/web/node_modules/moment/locale sync /^\.\/.*$/
是的,删除文件夹 node_modules 并安装 yarn/npm 解决了问题,谢谢!