npm ERR! Unexpected end of JSON input while parsing near
程序员文章站
2022-05-30 16:40:39
...
npm安装module时报错
C:\Users\80022319\Desktop\node\openfaas>npm install express -g
npm ERR! Unexpected end of JSON input while parsing near '...t":"^1.1.0","mkdirp":'
npm ERR! A complete log of this run can be found in:
npm ERR! D:\software\dev\node\node_cache\_logs\2020-12-29T05_51_48_634Z-debug.log
解决
-
npm cache clean --force
C:\Users\80022319\Desktop\node\openfaas>npm cache clean --force npm WARN using --force I sure hope you know what you are doing.
-
npm cache verify
C:\Users\80022319\Desktop\node\openfaas>npm cache verify Cache verified and compressed (D:\software\dev\node\node_cache\_cacache): Content verified: 63 (801482 bytes) Index entries: 91 Finished in 0.272s
-
npm install
C:\Users\80022319\Desktop\node\openfaas>npm install npm WARN deprecated undefined@0.1.0: this package has been deprecated npm WARN saveError ENOENT: no such file or directory, open 'C:\Users\80022319\Desktop\node\package.json' npm notice created a lockfile as package-lock.json. You should commit this file. npm WARN enoent ENOENT: no such file or directory, open 'C:\Users\80022319\Desktop\node\package.json' npm WARN node No description npm WARN node No repository field. npm WARN node No README data npm WARN node No license field. removed 2 packages in 11.817s found 0 vulnerabilities
-
npm install -g express
C:\Users\80022319\Desktop\node\openfaas>npm install -g express + express@4.17.1 added 50 packages from 37 contributors in 136.893s
推荐阅读
-
Unexpected end of JSON input while parsing near错误
-
亲测解决npm ERR! Unexpected end of JSON input while parsing near...的方法
-
npm ERR! Unexpected end of JSON input while parsing near
-
npm ERR! Unexpected end of JSON input while parsing near '...Rg9e9zaVBZ
-
“Unexpected end of JSON input while parsing near···”错误解决方案
-
解决npm ERR! Unexpected end of JSON input while parsing near的报错问题
-
Unexpected end of JSON input while parsing near
-
vue npm安装webpack报错:Unexpected end of JSON input while parsing near
-
Unexpected end of JSON input while parsing near错误
-
npm install出现Unexpected end of JSON input while parsing near错误解决方法