bailicangdu / react-pxq

一个 react + redux 的完整项目 和 个人总结

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

npm i 安装依赖报错,怎么回事?

lwx405540 opened this issue · comments

D:\code\github\react-pxq-master>npm i
npm WARN deprecated graceful-fs@3.0.11: please upgrade to graceful-fs 4 for comp
atibility with current and future versions of Node.js
npm ERR! code EBADPLATFORM
npm ERR! notsup Unsupported platform for fsevents@1.1.2: wanted {"os":"darwin","
arch":"any"} (current: {"os":"win32","arch":"x64"})
npm ERR! notsup Valid OS: darwin
npm ERR! notsup Valid Arch: any
npm ERR! notsup Actual OS: win32
npm ERR! notsup Actual Arch: x64

npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\lwx405540\AppData\Roaming\npm-cache_logs\2018-01-17T01_49
_37_239Z-debug.log

npm i
同样报错。

一样的错误。。

nodejs版本多少?

node v8.9.4

node版本8.9.1

npm i 同样报错。

commented

这个是因为一个依赖包进行了强平台检测 建议使用npm install --force来在win下安装依赖

commented

作者开发环境用的IOS 能不能为我们WIN系统下REACT初学者考虑下 调一下WIN下的依赖配置 感谢作者了

commented

有一个依赖包一直报错要求IOS环境 用--force命令也没用

commented

那我建议用下我的版本 我是用在win10上 用force成功安装 https://github.com/wlx200510/react-wlx

commented

好的 我去看看

关于 window 下的 npm i 报错的问题的解决方法
### 第一步:git clone 下代码之后 手动到文件夹里删除 node-modules 文件夹
第二步:删除 package.json 文件中 ‘’devDependencies‘’里面的 "fsevents": "1.1.2", 这是mac系统独有的。
第三步:npm\cnpm install node-sass sass-loader
第四步:npm start

执行以下几步就大公告成
bailicangdu 老师的项目都挺好的,vue的项目我做了一边,当时还没现在这么完善,个人也有一些关于vue的项目,都是要一定基础的,如果有需要可以自行去了解,链接为:https://github.com/15826954460
如果对您有帮助,记得给个 start