Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
406 views
in Technique[技术] by (71.8m points)

vue.js - I am trying to install vue3 js

I am trying to install vue3 js. but unfortunately I am getting an error please help me how can i resolve ? thanks.

developer@developer-ThinkCentre-M93p:~$ npm install -g @vue/cli

npm WARN deprecated [email protected]: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated @hapi/[email protected]: Switch to 'npm install joi'
npm WARN deprecated @hapi/[email protected]: This version has been deprecated and is no longer supported or maintained
npm WARN deprecated @hapi/[email protected]: This version has been deprecated and is no longer supported or maintained
npm WARN deprecated @hapi/[email protected]: This version has been deprecated and is no longer supported or maintained
npm WARN deprecated @hapi/[email protected]: Moved to 'npm install @sideway/address'
npm WARN deprecated [email protected]: this library is no longer supported
npm ERR! Unexpected end of JSON input while parsing near '...8HIwwH2SLKEsPpZqiiIW8'

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/developer/.npm/_logs/2021-01-27T02_11_15_446Z-debug.log
question from:https://stackoverflow.com/questions/65904940/i-am-trying-to-install-vue3-js

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

install vue-cli if you haven't yet

sudo npm install -g @vue/cli

OR update to latest

sudo npm update -g @vue/cli

then create a new project with

vue create hello-world

then select vue 3 project

enter image description here


Including comment from @Eazash:

You need to verify your npm cache with npm cache verify and then try installing vue-cli. If that doesn't work, try clearing the cache altogether with npm cache clean --force

could also try with sudo privileges: sudo npm cache verify and sudo npm cache clean --force


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...