【ipfs-api】npm ERR! JSON.parse package.json must be actual JSON, not just JavaScript.

出现这个问题的原因:

    本人是先使用npm install --save-dev ipfs-api下载的ipfs-api,使用该命令下载时,ipfs-api会单独放在devDependencies中,后来使用npm install --save ipfs-api重新安装的时,在删除devDependencies依赖时,少删除了一个逗号导致的。

npm ERR! code EJSONPARSE
npm ERR! file D:\contract\ipfs\go-ipfs\ipfs-http-demo\package.json
npm ERR! JSON.parse Failed to parse json
npm ERR! JSON.parse Unexpected token } in JSON at position 749 while parsing near '...version"
npm ERR! JSON.parse     ]
npm ERR! JSON.parse   },
npm ERR! JSON.parse }
npm ERR! JSON.parse '
npm ERR! JSON.parse Failed to parse package.json data.
npm ERR! JSON.parse package.json must be actual JSON, not just JavaScript.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\lenovo\AppData\Roaming\npm-cache\_logs\2020-08-17T11_01_41_124Z-debug.log

package.json图如下: 

 

删除最下边的那个逗号即可。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

zqq_2016

有用的话,来打赏博主吧

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值