更新下 使用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. Docker容器化技术(上)

    目录 Docker容器化技术 一.介绍 二.Docker的发展 三.Docker安装 四.阿里云Docker镜像加速 五.Docker的基本概念 六.命令 七.Docker宿主机与容器通信 八.容器内 ...

  2. node绑定域名 nginx篇

    创建nodejs文件,并测试执行有没有问题. var express = require('express'); var app = express(); app.get('/', function ...

  3. 用数组实现strstr函数

    用数组实现strstr函数char * mystrstr(char * dest, char *src){ int i = 0; int j = 0; //匹配个数 int count = 0; in ...

  4. 结构型模式(五) 外观模式(Facade)

    一.动机(Motivate) 在软件系统开发的过程中,当组件的客户(即外部接口,或客户程序)和组件中各种复杂的子系统有了过多的耦合,随着外部客户程序和各子系统的演化,这种过多的耦合面临很多变化的挑战. ...

  5. Oracle查询一个命名空间下所有表和视图的表名、字段名、字段类型、字段大小,是否可为NULL,主键和注释信息

    使用SQL查询Oracle一个命名空间下所有表和视图的表名.字段名.字段类型.字段大小,是否可为NULL,主键和注释信息. SQL如下,注意需要将'CDFLOOD'更换为您要查询的命名空间: sele ...

  6. 动手动脑-------找出指定文件夹下所有扩展名为.txt和.java的文件

    思路:首先向获取文件,如果是文件的话,则判断它是否以".txt"或".java"结尾,如果是则输出它的路径.如果是文件夹的话,则需获取子文件,利用递归方法遍历子 ...

  7. boost.tribool

    tribool boost.tribool类似c++内建的bool类,但基于三态的布尔逻辑,在true和false之外还有一个indeterminate状态.一个例子场景是执行某项任务,在执行之前状态 ...

  8. DW-ODS

    ODS (操作数据存储) 编辑 讨论 操作数据存储ODS(Operational Data Store)是数据仓库体系结构中的一个可选部分,也被称为贴源层.ODS具备数据仓库的部分特征和OLTP系统的 ...

  9. fread和fwrite和feof读写二进制文件

    #include <stdio.h> #include <stdlib.h> void text_to_bin(char *argv[]); void bin_to_text( ...

  10. codevs 4028 EZ系列

    4028 EZ系列之愤怒的一天   题目描述 Description 有一天,在某某教学楼某某课室某某课桌旁,某某某大声尖叫起来. 在那一瞬间,勇敢的丁畅大大站了出来,向某某某讨好,结果被揍得半死. ...