我如何解决laravel项目的npm安装问题

时间:2020-06-04 11:00:34

标签: laravel npm-install laravel-7 npm-publish npm-request

当我运行 npm i 时,它会返回错误。

C:\xampp\htdocs\personal\freshShop>npm i
**
npm WARN deprecated popper.js@1.16.1: You can find the new Popper v2 at @popperjs/core, this package is dedicated to the legacy v1
npm WARN deprecated chokidar@2.1.8: Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies.
npm WARN deprecated fsevents@1.2.13: fsevents 1 will break on node v14+ and could be using insecure binaries. Upgrade to fsevents 2.
npm WARN deprecated resolve-url@0.2.1: https://github.com/lydell/resolve-url#deprecated
npm WARN deprecated urix@0.1.0: Please see https://github.com/lydell/urix#deprecated
npm ERR! Unexpected end of JSON input while parsing near '...3ec2605d1fc435f4d8651' **

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\Najmun_Nafiz\AppData\Roaming\npm-cache\_logs\2020-06-04T02_02_30_082Z-debug.log

enter image description here

2 个答案:

答案 0 :(得分:0)

删除node_modules,'package-lock.json'并通过以下方法清除npm缓存: npm cache clean --force

答案 1 :(得分:0)

我通过将NodeJS版本升级到14.x解决了这个确切的问题。