更新下 使用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. wampserver - windows服务器下php运行环境配置

    之前一直在通过windows server IIS跑php程序,直到后来,发现了她 “wampserver", 一个法国的windows+apache+php+mysql部署包. 感觉挺好用 ...

  2. 十五.ProtoBuf3的基础总结

    转自: https://blog.csdn.net/u011518120/article/details/54604615 定义一个消息类型 指定字段类型 分配标识号 指定字段规则 添加更多消息类型 ...

  3. c语言逆序

    #include <stdio.h> #define MAXS 20 void reverse( char *p ); void reverse( char *p ) { int i = ...

  4. 接口-httpClient

    最近在工作的过程中有遇到httpClient接口,今天特意些一个小示例对这个知识点进行温习. 下面是代码小片段: package com.sinosoft.lis.mgubq.zhaoyongqian ...

  5. lambda 函数的用法

    lambda函数又叫匿名函数, 匿名函数就是没有名字的函数,不使用def语句声明的函数.如果要声名,则需要使用lambda关键字进行声明. 一般用来定义简单的函数. 1.声明一个简单的加法匿名函数: ...

  6. Javaweb学习笔记(一)

    一.javaweb学习是所需要的细节 1.发送响应头相关的方法 1).addHeader()与setHeader()都是设置HTTP协议的响应头字段,区别是addHeader()方法可以增加同名的响应 ...

  7. bzoj 2969: 矩形粉刷 概率期望+快速幂

    还是老套路:期望图上的格子数=$\sum$ 每个格子被涂上的期望=$\sum$1-格子不被图上的概率 这样的话就相对好算了. 那么,对于 $(i,j)$ 来说,讨论一下上,下,左,右即可. 然后发现四 ...

  8. 看加载的php.ini 和 phpinfo 配置路径

    php -i | grep "phar.readonly"看当前值php -i | grep "php.ini" 看加载的php.ini是哪个

  9. 51 Nod 1430 奇偶游戏(博弈)

    1430 奇偶游戏 题目来源: CodeForces 基准时间限制:1 秒 空间限制:131072 KB 分值: 160 难度:6级算法题 收藏 关注 有n个城市,第i个城市有ai个人.Daenery ...

  10. 17、stage划分算法原理及DAGScheduler源码分析

    一.stage划分算法原理 1.图解 二.DAGScheduler源码分析 1. ###org.apache.spark/SparkContext.scala // 调用SparkContext,之前 ...