1. 程式人生 > >Your life needs a sense of ritual!

Your life needs a sense of ritual!

一、vue開發前的準備

1.node.js環境搭建和npm的安裝

node.js的官網只需要登入官網看到‘install’按鈕就可以直接下載安裝;
這裡寫圖片描述
安裝完成後執行cmd命令,輸入node -v出現下圖提示的版本號就表示安裝成功了
這裡寫圖片描述
①npm作為NodeJs的模組管理-npm有一些基礎的命令例如:npm init , npm set, npm config等,具體可以看地址:地址連結

2.安裝全域性vue-cli 腳手架

(1)安裝命令:npm install -g vue-cli 回車,等待安裝;(如果不全域性-g,只能在指定目錄下使用腳手架)
(2)建立專案:vue init webpack

(專案資料夾名),回車,依次出現‘git’以下的選項
這裡寫圖片描述
(3)安裝依賴 cd (專案名),回車,進入到具體的專案資料夾名
npm install ,回車,專案結構裡,增加一個node_modules資料夾,基於vue 腳手架建立的預設專案結構如下圖所示:
這裡寫圖片描述
(4)測試環境是否搭建成功
在cmd 裡輸入:npm run dev 或者在瀏覽器輸入:localhost:8080(預設埠號是8080),執行成功後的介面如下圖
這裡寫圖片描述
在安裝過程中,可能遇到的問題,當我們執行某個專案的時候會提示:

> my-first-vue-project@1.0.0 dev C:\Users\ASUS\my-project
> node build/dev-server.js To use this template, you must update following to modules: npm: 2.15.9 should be >= 3.0.0

只有升級npm, npm -g install [email protected],全域性安裝最新的npm檔案,npm run dev 還是會提示錯誤,複製C:\Users{你的Windows使用者名稱}\AppData\Roaming\npm\node_modules\npm下的檔案到你的 NodeJS安裝目錄下的 \node_modules\npm 中,覆蓋掉原有的全部檔案

,最後執行npm run dev 執行
這裡寫圖片描述

相關推薦

Your life needs a sense of ritual!

一、vue開發前的準備 1.node.js環境搭建和npm的安裝 node.js的官網只需要登入官網看到‘install’按鈕就可以直接下載安裝; 安裝完成後執行cmd命令,輸入node -v出現下圖提示的版本號就表示安裝成功了 ①npm作為N

life like a bowl of soup

It seeming ,only liked a small obstacle for my life. if life look like a bowl of soup,sometimes it become salty,although we will fe

10 apps that can make your life way easier, all of which are on sale

Apps make the world go'round. Whether you're on the hunt for an app that can help you create a business plan or a platform that affords you unlimited acces

Marginally Interesting: Reclaim your data, own a piece of the cloud!

Tweet Lately I’ve been discussing quite a bit with Leo about the curren

Our Inner Narrator Gives Us Continuity and a Sense of Self

This story is for Medium members.Continue with FacebookContinue with GoogleMedium curates expert stories from leading publishers exclusively for members (w

Business genius can be taught, study says: The academic approach to business strategy needs a jolt of future focus

Luis Martins, director of the Herb Kelleher Center for Entrepreneurship at The University of Texas at Austin's McCombs School of Business, and co-author V

Check to See If Your Institution is a Member of AWS Educate

Amazon Web Services is Hiring. Amazon Web Services (AWS) is a dynamic, growing business unit within Amazon.com. We are currently hiring So

You really CAN follow your nose: People with a good sense of smell are better at navigation

When asking for directions, you should look for someone with a good sense of smell. That is the advice of scientists who have found that people with a natu

Digital immortality: How your life's data means a version of you could live forever

Hossein Rahnama knows a CEO of a major financial company who wants to live on after he's dead, and Rahnama thinks he can help him do it. Rahnama is creatin

Spring Boot:Action:Consider defining a bean of type '*.*.*' in your configuration解決方案

rri framework 成功 ould script ota http per apache   果然不看教程直接使用在遇到問題會懵逼,連解決問題都得搜半天還不一定能幫你解決了。。。 ***************************APPLICATION FAIL

解決錯誤:Your ApplicationContext is unlikely to start due to a @ComponentScan of the default package.

context 錯誤 com sta spa can src 直接 代碼 原因是代碼直接放在默認包裏邊,比如src\main\java目錄下 應該在src\main\java下建立子目錄,比如src\main\java\com\test 這樣的話,代碼就在com.tes

springboot Consider defining a bean of type 'xxx' in your configuration

bubuko post mil ini 分享 cat bsp ring fig 這個錯誤是service的bean註入失敗,主要是Application位置不對,要保證項目中的類在Application啟動服務器類的下一級目錄,如圖: springboot Consi

開機提示:one of your disks needs to be checked解決方法

分享一下我老師大神的人工智慧教程!零基礎,通俗易懂!http://blog.csdn.net/jiangjunshow 也歡迎大家轉載本篇文章。分享知識,造福人民,實現我們中華民族偉大復興!        

啟動項目,編譯報錯:Consider defining a bean of type 'XXX' in your configuration.

定義 多個 ica 錯誤 stc 就是 dea component 查看 在controller層註入ConfigBean,編譯器報錯: 一開是以為是intellij idea 的告警級別設定的問題,就沒有在意,繼續啟動項目,結果控制臺報錯:Consider defi

關於spring boot自動注入出現Mapper Consider defining a bean of type 'xxx' in your configuration問題解決方案

問題: Mapper註解不能被識別, Consider defining a bean of type 'XXX' in you configuration 參考其他部落格得到如下解決辦法: 在指定的application類上加上這麼一行註解,手動指定application類要

How To Size Your Apache Flink® Cluster: A Back-of-the-Envelope Calculation

January 11, 2018 - Apache Flink Robert Metzger and Chris Ward A favorite session from Flink Forward Berlin 2017 was Robert

開機提示 one of your disks needs to be checked解決方法

開機提示:one of your disks needs to be checked解決方法       筆記本啟動時,連續2天出現了上面的問題,並有時會出現藍屏現象。在撰寫畢業論文的關鍵時刻,如果出點什麼紕漏的話,自己是承擔不起嚴重後果的啊,果斷要進行修

SpringBoot報Consider defining a bean of type ‘xxx’ in your configuration怎麼解決

今天再跑SpringBoot專案時,在新加入SpringSecurity的時候,專案一直報錯,跑不起來,報錯原因如下: 報錯的原因就是因為我引入的PasswordEncoder沒有被注入到spring bean容器,導致無法啟動,所以我們需要手動就PasswordEncoder注入到bea

關於spring boot自動注入出現Consider defining a bean of type 'xxx' in your configuration問題解決方案

轉載自:   搭建完spring boot的demo後自然要實現自動注入來體現spring ioc的便利了,但是我在實施過程中出現了這麼一個問題,見下面,這裡找到解決辦法記錄下來,供遇到同樣的問題的同僚參考    Description: Field hel

2018年9-12月份雅思口語題庫素材(原創)describe the first cellphone of yours that brought changes to your life

When I was a child in the primary school, I always used my parents’ phone. After studying in the high school, I hoped to own a phone bel