gpt4 book ai didi

node.js - 跳过可选依赖项 : Unsupported platform for fsevents@1. 2.9:需要 {"os":"darwin","arch":"any"} (当前:{"os":"win32","arch"0 x104567910})

转载 作者:太空宇宙 更新时间:2023-11-03 23:13:25 27 4
gpt4 key购买 nike

我正在尝试安装Webpack但它不断地给我同样的警告,而且 webpack 仍然没有安装在我的项目中。这是我正在处理的一个现有项目。我尝试了很多命令,例如

npm install --no-optional

npm install --global webpack

npm install --save-dev webpack

npm install i -g --save-dev webpack webpack-dev-server

npm i -D webpack

yarn add webpack --dev

我尝试删除项目上的node_modules并再次安装它们,但它仍然给我相同的警告

SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.9: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})

并且 webpack 未安装。

最佳答案

I had a problem with versions so i fixed it like this : I installet WebPack Installer

Node-sass should support NodeJs version look which nodeJs version supports node-sass : Link

Delete node_modules folder in project and install again "npm install" in cmd

npm uninstall node-sass npm install node-sass@4.12.0 --- or the version which is supported for your NodeJs version

npm rebuild node-sass

这解决了我的 NodeJs 和 Node-sass 版本不同的问题

关于node.js - 跳过可选依赖项 : Unsupported platform for fsevents@1. 2.9:需要 {"os":"darwin","arch":"any"} (当前:{"os":"win32","arch"0 x104567910}),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58540369/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com