【发布时间】:2021-09-22 04:46:30
【问题描述】:
我目前正在使用 React 17.0.2(在 create-react-app 环境中)和 SCSS,突然之间,我不断收到以下警告反应:
你好,时间旅行者。我们正处于无前缀 CSS 的黄金时代,您的样式表不再需要 Autoprefixer。
我没有更新任何东西(至少据我所知),而且我使用的 Sass 编译器禁用了自动前缀。
我已尝试关注此线程上的所有答案:How do I solve "Greetings, time traveller. We are in the golden age of prefix-less CSS, where Autoprefixer is no longer needed for your stylesheet."?
然后运行npm update --save 无济于事。
警告不断混淆重要的消息和错误,处理起来非常痛苦,因此感谢所有帮助。
【问题讨论】:
-
您使用哪个代码来创建新项目? npm create-react-app 或 npx create-react-app
-
这应该是一条评论。但是,我使用了
npx。 -
我用 npx 做了一个新项目,但我们没有警告请测试此代码
npm audit fix或yarn audit fix
标签: javascript node.js reactjs sass