Closed hexyxj closed 6 years ago
try npm cache clean --force and then npm install -g @angular/cli
It works for me.
Had the same problem: npm ERR! Unexpected end of JSON input while parsing near '...compat.2.tgz","fileCo'
npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\DALTON\AppData\Roaming\npm-cache\_logs\2018-07-20T12_47_18_001Z-debug.log
And the solution was: npm cache clean --force
Thanks
Delete the node_modules
and the package-lock.json
and then execute the command.
In my case:
npm install nodemailer
or npm install
This works for me.
npm cache clean --force
please i had the ame problem and did npm cache clean --force but this is what it is showing me now npm WARN registry Unexpected warning for https://registry.npmjs.org/: Miscellaneous Warning ETIMEDOUT: request to https://registry.npmjs.org/connect failed, reason: connect ETIMEDOUT 104.16.22.35:443 npm WARN registry Using stale package data from https://registry.npmjs.org/ due to a request error during revalidation. npm ERR! code ETIMEDOUT npm ERR! errno ETIMEDOUT npm ERR! network request to https://registry.npmjs.org/websocket-extensions failed, reason: connect ETIMEDOUT 104.16.21.35:443 npm ERR! network This is a problem related to network connectivity. npm ERR! network In most cases you are behind a proxy or have bad network settings. npm ERR! network npm ERR! network If you are behind a proxy, please make sure that the npm ERR! network 'proxy' config is set properly. See: 'npm help config'
npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\hp\AppData\Roaming\npm-cache_logs\2018-09-20T19_36_30_757Z-debug.log
PLEASE FOR HELP TO SOLVE THAT
what does "npm WARN rollback" means please which error is that
My issue was as following: Unexpected end of JSON input while parsing near '...f2f9b8fd5ca9e429747e3'
My project was not installing and terminated in middle showing the above error, then googled I tried the following two commands: npm install npm@latest -g npm install --cache /tmp/empty-cache when I executed the above two commands one after one. And, then I created the project and then I found no issue coming in middle to terminate, my project was successfully installed or created. Hope this will be helpful to a few persons atleast.
Thanks il would ne very helpful
Le ven. 21 sept. 2018 à 09:58, gitmoin notifications@github.com a écrit :
My issue was as following: Unexpected end of JSON input while parsing near '...f2f9b8fd5ca9e429747e3'
My project was not installing and terminated in middle showing the above error, then googled I tried the following two commands: npm install npm@latest -g npm install --cache /tmp/empty-cache when I executed the above two commands one after one. And, then I created the project and then I found no issue coming in middle to terminate, my project was successfully installed or created. Hope this will be helpful to a few persons atleast.
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/vuejs-templates/webpack/issues/990#issuecomment-423464389, or mute the thread https://github.com/notifications/unsubscribe-auth/Ao-XILnhTFDG7fGUqIToQRjloMJsUsPxks5udKovgaJpZM4P7yXJ .
npm cache clean --force solve this problem
thanks it worked
Le jeu. 27 sept. 2018 à 12:51, pradeep notifications@github.com a écrit :
npm cache clean --force solve this problem
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/vuejs-templates/webpack/issues/990#issuecomment-425061231, or mute the thread https://github.com/notifications/unsubscribe-auth/Ao-XILf8T4ykotLIJcA3jdQzrWEHCNrYks5ufLvBgaJpZM4P7yXJ .
Had the same issue.. Cleaning the cache worked for me. "npm cache clean"
Ok thanks
Le mer. 3 oct. 2018 à 07:22, Ovais Ali notifications@github.com a écrit :
Had the same issue.. Cleaning the cache worked for me. "npm cache clean"
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/vuejs-templates/webpack/issues/990#issuecomment-426524390, or mute the thread https://github.com/notifications/unsubscribe-auth/Ao-XII4nl_PZxK4oF4zvEMcb0x_VP9b2ks5uhFeKgaJpZM4P7yXJ .
Salut a tous debutant dans le dev web j'aimerais bien apprendre le angular js et je voudrais savoir quel interface ou IDE pourrais aller le mieux avec ce framework.
npm cache clean --force
Ok thanks
Le ven. 12 oct. 2018 à 04:36, panw3i notifications@github.com a écrit :
npm cache clean --force
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/vuejs-templates/webpack/issues/990#issuecomment-429193838, or mute the thread https://github.com/notifications/unsubscribe-auth/Ao-XIO22FXXoBF_PKpbyybH912GRU19Tks5ukA5LgaJpZM4P7yXJ .
I solved the issues, It was due to a cache clear error (but *they auto repair) had some data corruption which didn't let the JSON files to parse. Thank you for the response Thorsten : ) Cheers, Peter Sam K … On 12 November 2017 at 20:21, Thorsten Lünborg @.***> wrote: I can't help you with that, because I can't reproduce the issue. And the issue seems to be with the npm mirror (taobao) you are using - it's returning incomplete files. If that's true, they have to fix their files, we can't do anything about this. — You are receiving this because you commented. Reply to this email directly, view it on GitHub <#990 (comment)>, or mute the thread https://github.com/notifications/unsubscribe-auth/ARH0420FSAdaU-6g-9ieQw5nZiQtjNP6ks5s1vDJgaJpZM4P7yXJ .
This helped me as well!!!!
To resolve issue, below command worked for me npm cache clean --force npm update npm install ng build ng serve
npm cache clean --force
it works for me
npm cache clean --force
It's solve for me.
@kwok7 Thanks a lot!
just a comment, that error sometimes is because you did changes in your packege.json and react cannot read it and when you reinstall npm the package.json works because in building again.
I am trying to install firebase in my angular project but gotten that same error
My issue was as following: Unexpected end of JSON input while parsing near '...f2f9b8fd5ca9e429747e3'
My project was not installing and terminated in middle showing the above error, then googled I tried the following two commands: npm install npm@latest -g npm install --cache /tmp/empty-cache when I executed the above two commands one after one. And, then I created the project and then I found no issue coming in middle to terminate, my project was successfully installed or created. Hope this will be helpful to a few persons atleast.
This "npm install npm@latest -g" worked for me! I really Thankful :)
Thanks I was later able to solve it by using "npm cache clean -- force" and after it was done I input the command again and it works. Thanks
On Nov 1, 2018 1:53 PM, "Muhammad Afzal Khan" notifications@github.com wrote:
My issue was as following: Unexpected end of JSON input while parsing near '...f2f9b8fd5ca9e429747e3'
My project was not installing and terminated in middle showing the above error, then googled I tried the following two commands: npm install npm@latest -g npm install --cache /tmp/empty-cache when I executed the above two commands one after one. And, then I created the project and then I found no issue coming in middle to terminate, my project was successfully installed or created. Hope this will be helpful to a few persons atleast.
This "npm install npm@latest -g" worked for me! I really Thankful :)
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/vuejs-templates/webpack/issues/990#issuecomment-435031481, or mute the thread https://github.com/notifications/unsubscribe-auth/ApOBC-bkC_T1EmhHOtW03wTgw8eUI-jgks5uqu64gaJpZM4P7yXJ .
All data that passes through the cache is fully verified for integrity on both insertion and extraction. Cache corruption will either trigger an error, or signal to pacote that the data must be refetched, which it will do automatically. For this reason, it should never be necessary to clear the cache for any reason other than reclaiming disk space, thus why clean now requires --force to run.
The npm cache is strictly a cache: it should not be relied upon as a persistent and reliable data store for package data. npm makes no guarantee that a previously-cached piece of data will be available later, and will automatically delete corrupted contents. The primary guarantee that the cache makes is that, if it does return data, that data will be exactly the data that was inserted.
But based on several issues (pretty common I guess), npm cache's "corruption-proof" seem to be just assumptions, not reality. :'(
thanks @theo4u it worked for me . :)
npm cache clean --force
it's worked for me
npm cache clean --force This work for me.. Thank you
第一种解决方法就是和上面一样:npm cache clean --force; 或者使用cnpm.
第二种就是:npm -g i npm@v 上面v表示版本
(其实就是网不好,缓存导致的)
npm cache clean --force
that solved
That really solves the issue. Thanks @kwok7 :)
I had to downgrade node and npm to 8.11.0 and 5.6.0 respectively and multiple tries with npm cache clean --force, finally it seems to be working now
@tudou123xu npm cache clean --force. That solved it quite alright. Great help guys
I have to agree with @deepakjha14 :
I had to downgrade node and npm to 8.11.0 and 5.6.0 respectively and multiple tries with npm cache clean --force, finally it seems to be working now
For me even npm cache clean --force
"works" intermittently. I needed to do several retries (probably catching different error each time) until everything went correctly. It's quite obvious to me that the way npm cache works is not foolproof, there are some conditions (network?) that can corrupt its state.
npm cache clean --force
You are right. But I can't understand about bug correctly.
cleaning cache actually worked 👍
npm cache clean --force
For window :- got to
C:\Users\username\AppData\Roaming\npm-cache
Delete all file and run
npm install && npm start
pls help me am having this error when i tried to create new file npm ERR! code ENOGIT npm ERR! Error while executing: npm ERR! undefined ls-remote -h -t ssh://git@github.com/expo/vector-icons.git npm ERR! npm ERR! undefined npm ERR! No git binary found in $PATH npm ERR! npm ERR! Failed using git. npm ERR! Please check if you have git installed and in your PATH.
npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\USER\AppData\Roaming\npm-cache_logs\2019-01-22T05_17_35_372Z-debug.log [10:17:35] Process exited with non-zero code: 1 [10:17:35] Set EXPO_DEBUG=true in your env to view the stack trace.
npm cache clean worked for me
Thank you, I was having the same problem.
Debes eliminar el siguiente archivo 'package.lock.json', luego deberas correr npm install y deberia funcionar correctamente.
"npm cache clean --force" didn't work for me but removing package-lock.json worked.
finally I solved it, ty!
I also made the same mistake. Finally, I solved the problem by deleting all the contents in the cache folder. I hope I can help you.
@tudou123xu npm cache clean --force
you saved my life <3
this solved it npm/npm#19072 (comment)
god bless you
npm cache clean --force
worked for me, thanks
npm cache clean --force this worked for me. thanks a million
npm cache clean --force
this is my solved
@tudou123xu npm cache clean --force
so good
npm cache clean --force
Thank you for solving the problem. Thank you for your interest and dedicated guidance via mail. Thank you so muchhhhhhhhhhhhhhh
Vào Th 5, 14 thg 3, 2019 vào lúc 18:52 Jack Chen notifications@github.com đã viết:
npm cache clean --force
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/vuejs-templates/webpack/issues/990#issuecomment-472820415, or mute the thread https://github.com/notifications/unsubscribe-auth/AuAvemLyHRQTMMYHqRffekLmT7FQpp-zks5vWjfrgaJpZM4P7yXJ .
npm ERR! Unexpected end of JSON input while parsing near '...nd-index-1.0.2.tgz" },'
npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\web-01\AppData\Roaming\npm-cache_logs\2017-10-17T08_41_53 _608Z-debug.log
error log
node 6.11.0 npm 5.5.1