更新下 使用yarn貌似会帮助跳过这个问题:

info fsevents@2.1.2: The platform "win32" is incompatible with this module.
info "fsevents@2.1.2" is an optional dependency and failed compatibility check. Excluding it from installation.
info fsevents@1.2.9: The platform "win32" is incompatible with this module.
info "fsevents@1.2.9" is an optional dependency and failed compatibility check. Excluding it from installation.

===

有需要下载了一个模板项目,安装ui部分失败,提示:

npm WARN deprecated fsevents@1.2.9: One of your dependencies needs to upgrade to fsevents v2: 1) Proper nodejs v10+ support 2) No more fetch
ing binaries from AWS, smaller package size
npm ERR! Unexpected end of JSON input while parsing near '...LNCxGNsOAHRWRMGoXrtcI'

npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\user\AppData\Roaming\npm-cache\_logs\2019-12-06T07_31_31_687Z-debug.log

单独提出来安装:

$ npm install fsevents
npm ERR! code EBADPLATFORM
npm ERR! notsup Unsupported platform for fsevents@2.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\neoliu6\AppData\Roaming\npm-cache\_logs\2019-12-06T07_33_23_843Z-debug.log

原因明了了,这个包是在mac系统中的,windows没有。查了下资料,大概是windows也不需要,不用安装。

解决方法是,把fsevents依赖放到可选依赖中:

vi package.json

  "optionalDependencies": {
"fsevents": "*"
}

重新执行安装(有个坑,需要删除package_lock.json,否则标记会失效,所有依赖都将被安装):

npm install --no-optional

参考资料:

https://stackoverflow.com/questions/41570364/npm-install-not-working-in-windows#

But it says it is optional so I ran $npm install --no-optional and that error went away but I still can't install.

https://github.com/npm/npm/issues/17633

I'm seeing this today with npm 5.3.0. npm install --no-optional works IIF a package-lock.json does not exist. If the package-lock.json file exists, then the flag is ignored and all dependencies get installed.

 
 
 

npm WARN deprecated fsevents windows的更多相关文章

  1. 安装hexo报错(npm WARN deprecated swig@1.4.2: This package is no longer maintained),已解决

    问题:在使用npm安装hexo时报错 $ npm install -g hexo npm WARN deprecated swig@1.4.2: This package is no longer m ...

  2. Error: npm WARN deprecated minimatch@2.0.10: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue

    执行npm install 时,提示警告信息: Error: npm WARN deprecated minimatch@2.0.10: Please update to minimatch 3.0. ...

  3. npm WARN deprecated socks@1.1.10: If using 2.x branch, please upgrade to at least 2.1.6

    cnpm安装的时候出现的一个问题. 使用npm install cnpm -g --registry=https://registry.npm.taobao.org命令的时候就会出现下图中的WARN. ...

  4. vue运行时 eslint 报“import/first” WARN deprecated browserslist 问题解决

    vue运行时 eslint 报“import/first”  WARN deprecated browserslist 问题解决 这个信息的意思是导入文件顺序不对,绝对导入应该放在相对导入前面.将绝对 ...

  5. 【记录bug】npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.7 (node_modules\fsvents): npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents1.2.7: wanted {"os":"darwin

    npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.7 (node_modules\fsvents): npm WARN nots ...

  6. webpack安装,npm WARN optional SKIPPING OPTIONAL DEPENDENCY,npm WARN notsup SKIPPING OPTIONAL DEPENDENCY警告

    npm install webpack -g//全局安装webpack 电脑上安装完后: 其中有两个警告: npm WARN optional SKIPPING OPTIONAL DEPENDENCY ...

  7. an'gularjs 环境搭建之NodeJS、NPM安装配置步骤(windows版本)

    NodeJS.NPM安装配置步骤(windows版本)  :http://xiaoyaojones.blog.163.com/blog/static/28370125201351501113581/ ...

  8. npm不能安装任何包,报错:npm WARN onload-script failed to require onload script npm-autoinit/autoinit及解决方法

    想要利用Hexo搭建一个博客,但是安装时npm一直报错,不仅仅是Hexo包,连别的其他包也不行,会提示下面的一堆错误 npm WARN onload-script failed to require ...

  9. react-native init的时候出现问题:npm WARN React-native@0.35.0 requires a peer of react@~15.3.1 but none was

    react-native init的时候出现问题:npm WARN React-native@0.35.0 requires a peer of react@~15.3.1 but none was ...

随机推荐

  1. yum 异常解决一例

    http://mirrors.cloud.aliyuncs.com/centos/6/os/x86_64/repodata/repomd.xml: [Errno 14] PYCURL ERROR 22 ...

  2. 洛谷 P1280 尼克的任务题解

    题目链接:https://www.luogu.org/problem/P1280 题目描述 尼克每天上班之前都连接上英特网,接收他的上司发来的邮件,这些邮件包含了尼克主管的部门当天要完成的全部任务,每 ...

  3. P1559 运动员最佳匹配问题[最大费用最大流]

    题目描述 羽毛球队有男女运动员各n人.给定2 个n×n矩阵P和Q.P[i][j]是男运动员i和女运动员j配对组成混合双打的男运动员竞赛优势:Q[i][j]是女运动员i和男运动员j配合的女运动员竞赛优势 ...

  4. K-means: optimization objective(最小化cost function来求相应的参数)

    类似于linear regression,K-means算法也optimization objective或者是试图使cost function求最小值. 了解K-means算法的optimizati ...

  5. maven 在执行package,install,deploy时使用clean与不使用clean的区别

    有时候用mvn install后,新改的内容不生效,一定要后来使用mvn clean install 才生效,由于之前没有做记录,以及记不清是什么情况下才会出现的问题,于是想看看clean和不clea ...

  6. C++创建对象的3种方式(转载)

    #include <iostream> using namespace std; class A { private: int n; public: A(int m):n(m) { } ~ ...

  7. Chrome抓包小技巧

    1.抓包时如果有页面跳转,记得把preserve log这个选项勾上

  8. [React] Use the React Effect Hook in Function Components

    Similar to the State Hook, the Effect Hook is “first-class” in React and handy for performing side e ...

  9. RabbitMQ交换机、RabbitMQ整合springCloud

    目标 1.交换机 2.RabbitMQ整合springCloud 交换机 蓝色区域===生产者 红色区域===Server:又称Broker,接受客户端的连接,实现AMQP实体服务 绿色区域===消费 ...

  10. YAML_03 用playbook安装Apache,修改端口,配置ServerName,修改主页,设置开机自启

    ansible]# vim http.yml --- - hosts: cache   remote_user: root   tasks:     - name: install one speci ...