nodejs学习笔记--Unexpected end of JSON input while parsing near ‘...“解决方法
Unexpected end of JSON input while parsing near '…"解决方法
在学习nodejs时,用命令行工具执行npm install xxx,经常卡住或失败,因此想利用第三方模块nrm提高下载速度。
问题:命令行工具执行npm install nrm时,卡住或报错Unexpected end of JSON input while parsing near…
解决:参考前辈的解决思路,成功解决了该问题。
(1)npm install --registry=https://registry.npm.taobao.org --loglevel=silly
(2) npm cache clean --force
(3) npm install
PS G:\Web\程序\3-code\gulp-demo> npm install --registry=https://registry.npm.taobao.org --loglevel=silly
npm info it worked if it ends with ok
npm verb cli [
npm verb cli 'C:\\Program Files\\nodejs\\node.exe',
npm verb cli 'C:\\Users\\Anne\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js',
npm verb cli 'install',
npm verb cli '--registry=https://registry.npm.taobao.org',
npm verb cli '--loglevel=silly'
npm verb cli ]
npm info using npm@6.14.8
npm info using node@v12.16.2
npm verb npm-session 40964fe4deed08af
npm sill install runPreinstallTopLevelLifecycles
npm sill install loadCurrentTree
npm sill install readLocalPackageData
npm timing stage:loadCurrentTree Completed in 24ms
npm sill install loadIdealTree
npm sill install cloneCurrentTreeToIdealTree
npm timing stage:loadIdealTree:cloneCurrentTree Completed in 1ms
npm sill install loadShrinkwrap
npm timing stage:loadIdealTree:loadShrinkwrap Completed in 5ms
npm sill install loadAllDepsIntoIdealTree
npm timing stage:loadIdealTree:loadAllDepsIntoIdealTree Completed in 8ms
npm timing stage:loadIdealTree Completed in 24ms
npm sill currentTree gulp-demo
npm sill idealTree gulp-demo
npm sill install generateActionsToTake
npm timing stage:generateActionsToTake Completed in 11ms
npm sill diffTrees action count 0
npm sill decomposeActions action count 0
npm sill install executeActions
npm sill doSerial global-install 0
npm verb correctMkdir C:\Users\Anne\AppData\Roaming\npm-cache\_locks correctMkdir not in flight; initializing
npm verb makeCacheDir UID & GID are irrelevant on win32
npm verb lock using C:\Users\Anne\AppData\Roaming\npm-cache\_locks\staging-75615effd37d994b.lock for G:\Web\程序\3-code\gulp-demo\node_modules\.staging
npm sill doParallel extract 0
npm sill doReverseSerial unbuild 0
npm sill doSerial remove 0
npm sill doSerial move 0
npm sill doSerial finalize 0
npm sill doParallel refresh-package-json 0
npm sill doParallel preinstall 0
npm sill doSerial build 0
npm sill doSerial global-link 0
npm sill doParallel update-linked 0
npm sill doSerial install 0
npm sill doSerial postinstall 0
npm verb unlock done using C:\Users\Anne\AppData\Roaming\npm-cache\_locks\staging-75615effd37d994b.lock for G:\Web\程序\3-code\gulp-demo\node_modules\.staging
npm timing stage:executeActions Completed in 223ms
npm timing stage:rollbackFailedOptional Completed in 0ms
npm sill install runPostinstallTopLevelLifecycles
npm sill build gulp-demo
npm info linkStuff !invalid#1
npm sill linkStuff !invalid#1 has G:\Web\程序\3-code as its parent node_modules
npm sill install gulp-demo
npm info lifecycle undefined~install: undefined
npm sill postinstall gulp-demo
npm info lifecycle undefined~postinstall: undefined
npm sill prepublish gulp-demo
npm info lifecycle undefined~prepublish: undefined
npm info lifecycle undefined~prepare: undefined
npm timing stage:runTopLevelLifecycles Completed in 407ms
npm sill saveTree gulp-demo
npm sill install saveToDependencies
npm WARN saveError ENOENT: no such file or directory, open 'G:\Web\程序\3-code\gulp-demo\package.json'
npm info lifecycle undefined~preshrinkwrap: undefined
npm info lifecycle undefined~shrinkwrap: undefined
npm notice created a lockfile as package-lock.json. You should commit this file.
npm info lifecycle undefined~postshrinkwrap: undefined
npm WARN enoent ENOENT: no such file or directory, open 'G:\Web\程序\3-code\gulp-demo\package.json'
npm verb enoent This is related to npm not being able to find a file.
npm verb enoent
npm WARN gulp-demo No description
npm WARN gulp-demo No repository field.
npm WARN gulp-demo No README data
npm WARN gulp-demo No license field.npm sill install printInstalled
npm http fetch POST 404 https://registry.npm.taobao.org/-/npm/v1/security/audits/quick 676ms
up to date in 0.792s
npm verb exit [ 0, true ]
npm timing npm Completed in 3577ms
npm info ok
PS G:\Web\程序\3-code\gulp-demo> npm install
npm WARN saveError ENOENT: no such file or directory, open 'G:\Web\程序\3-code\gulp-demo\package.json'
npm WARN enoent ENOENT: no such file or directory, open 'G:\Web\程序\3-code\gulp-demo\package.json'
npm WARN gulp-demo No description
npm WARN gulp-demo No repository field.
npm WARN gulp-demo No README data
npm WARN gulp-demo No license field.up to date in 0.635s
PS G:\Web\程序\3-code\gulp-demo>
PS G:\Web\程序\3-code\gulp-demo> npm install nodemon> nodemon@2.0.4 postinstall G:\Web\程序\3-code\gulp-demo\node_modules\nodemon
> node bin/postinstall || exit 0npm WARN saveError ENOENT: no such file or directory, open 'G:\Web\程序\3-code\gulp-demo\package.json'
npm WARN enoent ENOENT: no such file or directory, open 'G:\Web\程序\3-code\gulp-demo\package.json'
npm WARN gulp-demo No description
npm WARN gulp-demo No repository field.
npm WARN gulp-demo No README data
npm WARN gulp-demo No license field.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@2.1.3 (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.1.3: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})+ nodemon@2.0.4
added 120 packages from 54 contributors in 23.948s10 packages are looking for fundingrun `npm fund` for details
[参考原帖链接] https://blog.csdn.net/longzhoufeng/article/details/104961342
nodejs学习笔记--Unexpected end of JSON input while parsing near ‘...“解决方法相关推荐
- Unexpected end of JSON input while parsing near '...解决方法
问题描述: Unexpected end of JSON input while parsing near '-" 解决办法: npm install --registry=https:// ...
- Unexpected end of JSON input while parsing near ‘...“解决方法
问题描述: Unexpected end of JSON input while parsing near '-" 解决办法: (1)npm install --registry=https ...
- 解决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的方法汇总
这两天执行 npm install 时会报错误: npm ERR! Unexpected end of JSON input while parsing near 这个错误的解决方法有以下几种: 1. ...
- Unexpected end of JSON input while parsing near
CMD报错是这样的 看真正的日志后,Unexpected end of JSON input while parsing near 运行:npm cache clean --force: 即可解决出现 ...
- Unexpected end of JSON input while parsing near错误解决方式(网上的方法)
原本是想创建一个create-react-app来着,但是在创建的中间会出现Unexpected end of JSON input while parsing near... 的错误. 在网上找到了 ...
- npm ERR! Unexpected end of JSON input while parsing near '...Comment: https://open'
今天在安装依赖包的时候老报错,报错如下: npm ERR! Unexpected end of JSON input while parsing near '...Comment: https://o ...
- 成功解决Unexpected end of JSON input while parsing near的问题
成功解决Unexpected end of JSON input while parsing near的问题(执行npm install的时候报出的错误) 出现的问题,我是在命令行执行npm inst ...
- 解决npm ERR! Unexpected end of JSON input while parsing near问题
之前在用node.js下art-template的时候发现报了错,就是npm ERR! Unexpected end of JSON input while parsing near这个错误,因为错误 ...
最新文章
- mongo java client_mongodb java客户端的使用,即MongoClient
- 对原生ajax的理解
- 漫步最优化四十——Powell法(上)
- 取景框图片 小程序_微信小程序实现身份证取景框拍摄
- mysql增量备份脚本
- 三岁小孩开发搜索引擎,搜索引擎白热化[原创]
- 计算机指令集编程教程,PLC编程语言入门,常用指令集汇总分享
- 如何在文件夹中打开DOS命令窗口
- 微信小程序列表渲染(循环渲染)
- 时文阅读-The economist-Whatever Carlos Ghosn’s misdeeds, Japan’s openness is also on trial
- Windows之cmd命令检查网络
- 声音在计算机内表现形式为,声音与视频信息在计算机内的表现形式是什么
- mysql分组查询学生平均年龄_那些年我们一起做过的[分组查询]_MySQL
- 中鑫吉鼎|家庭成长期如何进行理财规划
- 前端核武器:开源FrontendBlocks所见即所得低代码编辑器让所有人都能做前端布局
- Linux期末考试复习大纲
- 拥抱开源,我们是认真的-网易易数2020年Apache Spark贡献总结
- MD04, MD05, MD07, MD07区别
- element ui table中想使得其中一列数据拥有横向滚动条的效果
- typemonkey怎么安装?typemonkey怎么用?ae脚本typemonkey教程