[英]i have migrated angular project from one computer to another and when I run `npm i` it gives me these errors
$ npm install
npm ERR! code EJSONPARSE
npm ERR! file /home/germanus/Documents/Angular_projects/demoproj/package.json
npm ERR! JSON.parse Failed to parse json
npm ERR! JSON.parse Unexpected token in JSON at position 0 while parsing near '...'
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! /home/germanus/.npm/_logs/2021-04-17T09_15_03_006Z-debug.log
delete package-lock.json
npm clear -f cache
npm i
Deleting node_modules
folder and package-lock.json
file and then executing the following command could resolve your issue:删除
node_modules
文件夹和package-lock.json
文件,然后执行以下命令可以解决您的问题:
npm install
It should re-generate the node_modules
folder and package-lock.json
file.它应该重新生成
node_modules
文件夹和package-lock.json
文件。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.