Closed hexyxj closed 6 years ago
Seems like there was just a download error. Did you try again?
I have reinstalled nodejs and vue-cli, and I tried to init a new project. while excuting npm install
, above error showed again.
May be my environment matter...
thanks for you reply! 👍
I will close this since it seems to be a problem with your npm connection/mirror, not this template.
I reinstalled still it pops ups the same error message
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.
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 notifications@github.com 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 https://github.com/vuejs-templates/webpack/issues/990#issuecomment-343736884, or mute the thread https://github.com/notifications/unsubscribe-auth/ARH0420FSAdaU-6g-9ieQw5nZiQtjNP6ks5s1vDJgaJpZM4P7yXJ .
@PeterSamK 你怎么解决的啊,我遇到了同样的问题
@cqgsm ni jie jue le ma?
I also encountered the same problem, how do you solve? 我也遇到了同样的问题,请问你怎么解决的?
@cqgsm Just completely uninstall the Node.js from Programs and Features and Re-install it,Make sure that you completely deleted all the node-modules and npm caches in the Npm folder and not present anywhere else
I also have the same problem
@tudou123xu npm cache clean --force
npm cache clean --force
that solved
things done
Yeah
On Sun, Apr 8, 2018, 8:28 AM 旺仔牛奶 notifications@github.com wrote:
things done
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/vuejs-templates/webpack/issues/990#issuecomment-379515533, or mute the thread https://github.com/notifications/unsubscribe-auth/ARH040JnsmqyoUIXPGTmf9x1fnMAp9gxks5tmXy6gaJpZM4P7yXJ .
Well I faced a similar issue while doing npm install
npm ERR! Unexpected token < in JSON at position 0 while parsing near '<!DOCTYPE HTML PUBLI...'
The problem was with the internal-npm-registry. I had to go to the internal jFrog repository to find out the setup up command to use the correct url.
Also there was no need for clearing the npm cache as suggested earlier.
thks @kwok7 solve
why there is still npm ERR! Unexpected end of JSON input while parsing near '...hasShrinkwrap":false,' after i run npm cache clean --force and it just stucks here even without showing ERR! A complete log of this run can be found in: npm ERR! /Users/apple/.npm/_logs/2018-05-10T02_39_59_805Z-debug.log and quitting? Can someone help me?
perfect!
@18811376770 Did yout tried npm cache clean --force? I tried it, but same error occurs.
Try clearing the npm cache at C:\Users\PC\AppData\Roaming\npm-cache\
npm cache clean --force this worked for me :+1:
npm cache clean --force this worked for me
"npm cache clean --force" didn't work for me but removing package-lock.json worked.
npm cache clean --force
try
if falsenpm set registry https://registry.npmjs.org/
don't use taobao mirror
try again@KevinYY Thanks , the last point worked for me!
thank you
I have the same issue like this when i tried to install ”forever“:
npm ERR! Unexpected token < in JSON at position 0 while parsing near '<!DOCTYPE html PUBLI...'
The version of my node.js is v8.11.2, npm version is 5.6.0, and my host operation system is CentOS 7 and i have tried all the solutions mentioned above but it`s still not worked.
Am experiencing same issue with react native app after upgrading expo: the log does not have any helpful information
had the same problem and solved it like this: open a directory and in the url enter this: C:\Users/\%username%\AppData\Roaming search for npm-cache and rename it to npm-cache.old
What is the solution to this error? npm install -g create-react-app reactproject npm ERR! code E404 npm ERR! 404 Not Found: reactproject@latest
npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\user\AppData\Roaming\npm-cache_logs\2018-07-02T13_07_24_033Z-debug.log
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
run npm cache clean --force working fine to me.
The following step worked for me.
npm cache clean --force
This worked for me
I think it was a network issue while downloading the package
try
npm cache clean --force
i had the same error, the best option is uninstall all, node, npm and angular cli, repeat the installation and clean the cache of npm with:
npm cache clean --force
if is necessary for twice you try clean the cache
Had the same error, I had slow connection and this problem occurred, can't install it. I was thinking this some kind of problem with cache, Luckily I found the command for it so fast npm cache clean --force
. then retry to install it with the following command npm install electron --save-dev
and done.
我之前将npm默认使用淘宝源下载了,试了一下上面大佬的猜测,将npm重新指向了默认源,就好了
dont use taobao repo, install goes well.
thanks, @kwok7 ! It works for me also. :) 👍
npm cache clean --force
This worked for me. @kwok7 Thanks so much!
npm cache clean --force This should do the trick Might take time to run depending on the number of packages you have on cache
npm cache clean --force
really works for me.
I rerun npm install
with Taobao registry, and the error goes away. I assume registry is not concerned with the error.
@kwok7 Thanks a lot.
cleaning the cache with force solved the issue for "unexpected JSON parse error" when i tried installing vue cli 3
Remove the node_module
folder from the project repository.
run the npm install -g @vue/cli
.
And then run the command npm install
.
Its works for me.
npm cache clean --force
worked perfectly
npm cache clean --force
npm cache clean --force
it's worked for me
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