博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
npm加载包报错 :syscall access
阅读量:6985 次
发布时间:2019-06-27

本文共 1206 字,大约阅读时间需要 4 分钟。

1 $ npm install --save-dev babel-plugin-syntax-dynamic-import 2 npm WARN checkPermissions Missing write access to D:\sword\react1\r1\node_modules\fsevents 3 npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.0.0 (node_modules\chokidar\node_modules\fsevents): 4 npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.1.2: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"}) 5  6 npm ERR! path D:\sword\react1\r1\node_modules\fsevents 7 npm ERR! code ENOENT 8 npm ERR! errno -4058 9 npm ERR! syscall access10 npm ERR! enoent ENOENT: no such file or directory, access 'D:\sword\react1\r1\node_modules\fsevents'11 npm ERR! enoent This is related to npm not being able to find a file.12 npm ERR! enoent13 14 npm ERR! A complete log of this run can be found in:15 npm ERR!     F:\nodejs\node_cache\_logs\2017-10-30T04_43_57_804Z-debug.log
View Code

今天尝试打包react项目的时候 ,由于router4打包比较麻烦。在文档

中提到使用 and 

但是在加载import插件的时候,报错syscall access ,github一查,发现是个偶尔出现但尚没有好的解决方案。。网友们要么回退版本要么用yarn。。。

我也是醉了

错误的大意是找不到module中的fsevents文件,但这就奇怪了,这个包的页面上并未提到有什么依赖关系,也不可能是我的node中文件丢失

后来发现改用cnpm加载就没问题...

前端有时候就是会遇到这类weird的问题。。。

转载于:https://www.cnblogs.com/alan2kat/p/7754028.html

你可能感兴趣的文章
C#与时间有关的一些方法
查看>>
android BitMap回收
查看>>
spring 的配置 bean>>property>>name属性
查看>>
洛谷P4114 Qtree1(树链剖分+线段树)
查看>>
51nod 1781 Pinball(线段树)
查看>>
swift 小练习
查看>>
洛谷3605 Promotion Counting
查看>>
json数据封装以及使用Gson将json数据封装到bean
查看>>
011_Validation Rule about Time
查看>>
java代码代替xml实现图片
查看>>
图片轮播,纯js+css
查看>>
Sencha Touch 搭建命令
查看>>
topcoder srm 320 div1
查看>>
topcoder srm 714 div1
查看>>
Springboot——HelloWorld
查看>>
JAVA原生mvc实现用户信息的增删查改
查看>>
MySQL Server 5.0安装教程
查看>>
iOS开发网络篇—网络请求(HTTP协议)小结(转)
查看>>
navicate连接Linux下mysql慢,卡,以及mysql相关查询,授权
查看>>
Unity 各平台中的路径
查看>>