最新国产好看的视频,伊人天堂AV在线,国产Aaaaaa视频,蜜臀视频在线观看一区,人妻av色图,密臀久久久精品影片,青青视频免费观看毛片,久草在线观看视,国产三级精品色情在线

AngularJS安裝版本問題解析

 更新時間:2024年02月27日 12:11:54   作者:覺醒法師  
這篇文章主要介紹了AngularJS安裝版本問題解析,在這需要注意在安裝前請確保自己安裝NodeJS環(huán)境版本為V18及以上,否則會因node版本問題導致項目無法正常運行,需要的朋友可以參考下

一、安裝

Angular CLI 腳手架安裝命令:

npm install -g @angular/cli

在安裝前請確保自己安裝NodeJS環(huán)境版本為V18及以上,否則會因node版本問題導致項目無法正常運行。

腳手架安裝后,已提示了當前node版本必須為18.13.0或大于20.9.0版本:

在node版本不一致情況下,創(chuàng)建項目會提示Node.js版本必須為v18.13,如下圖:

二、匹配版本

本人電腦上使用的node版本為v16,在不升級node版本情況下,可以考慮降低@angular/cli版本,地址:Releases · angular/angular-cli · GitHub

2.1 安裝命令

在Releases中找到對應版本進行安裝,命令如下:

npm install -g @angular/cli@16.2.6

此時則沒有版本問題提示了,如下圖:

2.2 創(chuàng)建項目

D:\workspace\web\angular>ng new hello-world
? Would you like to share pseudonymous usage data about this project with the Angular Team
at Google under Google's Privacy Policy at https://policies.google.com/privacy. For more
details and how to change this setting, see https://angular.io/analytics. Yes
Thank you for sharing pseudonymous usage data. Should you change your mind, the following
command will disable this feature entirely:
    ng analytics disable --global
Global setting: enabled
Local setting: No local workspace configuration file.
Effective status: enabled
? Would you like to add Angular routing? Yes
? Which stylesheet format would you like to use? SCSS   [ https://sass-lang.com/documentation/syntax#scss
 ]
CREATE hello-world/angular.json (2899 bytes)
CREATE hello-world/package.json (1042 bytes)
CREATE hello-world/README.md (1064 bytes)
CREATE hello-world/tsconfig.json (901 bytes)
CREATE hello-world/.editorconfig (274 bytes)
CREATE hello-world/.gitignore (548 bytes)
CREATE hello-world/tsconfig.app.json (263 bytes)
CREATE hello-world/tsconfig.spec.json (273 bytes)
CREATE hello-world/.vscode/extensions.json (130 bytes)
CREATE hello-world/.vscode/launch.json (470 bytes)
CREATE hello-world/.vscode/tasks.json (938 bytes)
CREATE hello-world/src/main.ts (214 bytes)
CREATE hello-world/src/favicon.ico (948 bytes)
CREATE hello-world/src/index.html (296 bytes)
CREATE hello-world/src/styles.scss (80 bytes)
CREATE hello-world/src/app/app-routing.module.ts (245 bytes)
CREATE hello-world/src/app/app.module.ts (393 bytes)
CREATE hello-world/src/app/app.component.html (23115 bytes)
CREATE hello-world/src/app/app.component.spec.ts (1006 bytes)
CREATE hello-world/src/app/app.component.ts (216 bytes)
CREATE hello-world/src/app/app.component.scss (0 bytes)
CREATE hello-world/src/assets/.gitkeep (0 bytes)
√ Packages installed successfully.
warning: LF will be replaced by CRLF in .editorconfig.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in .gitignore.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in .vscode/extensions.json.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in .vscode/launch.json.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in .vscode/tasks.json.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in README.md.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in angular.json.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in package-lock.json.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in package.json.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in src/app/app-routing.module.ts.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in src/app/app.component.html.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in src/app/app.component.spec.ts.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in src/app/app.component.ts.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in src/app/app.module.ts.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in src/index.html.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in src/main.ts.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in src/styles.scss.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in tsconfig.app.json.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in tsconfig.json.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in tsconfig.spec.json.
The file will have its original line endings in your working directory
    Successfully initialized git.

2.3 運行項目

選擇項目目錄:

D:\workspace\web\angular>cd hello-world

運行hello-world項目命令如下:

D:\workspace\web\angular\hello-world>ng serve --open
? Would you like to share pseudonymous usage data about this project with the Angular Team
at Google under Google's Privacy Policy at https://policies.google.com/privacy. For more
details and how to change this setting, see https://angular.io/analytics. Yes
Thank you for sharing pseudonymous usage data. Should you change your mind, the following
command will disable this feature entirely:
    ng analytics disable
Global setting: enabled
Local setting: enabled
Effective status: enabled
√ Browser application bundle generation complete.
Initial Chunk Files   | Names         |  Raw Size
vendor.js             | vendor        |   2.35 MB |
polyfills.js          | polyfills     | 333.17 kB |
styles.css, styles.js | styles        | 230.92 kB |
main.js               | main          |  48.74 kB |
runtime.js            | runtime       |   6.52 kB |
                      | Initial Total |   2.96 MB
Build at: 2024-02-26T08:05:28.353Z - Hash: daa545468f767600 - Time: 33009ms
** Angular Live Development Server is listening on localhost:4200, open your browser on http://localhost:4200/ **
√ Compiled successfully.

運行結果下圖:

如上圖,項目可以正常運行了。

到此這篇關于AngularJS安裝版本問題的文章就介紹到這了,更多相關AngularJS安裝版本問題內容請搜索腳本之家以前的文章或繼續(xù)瀏覽下面的相關文章希望大家以后多多支持腳本之家!

相關文章

  • AngularJS 指令的交互詳解及實例代碼

    AngularJS 指令的交互詳解及實例代碼

    這篇文章主要介紹了AngularJS 指令的交互,這里整理了詳細的資料及實例代碼,有興趣的小伙伴可以參考下
    2016-09-09
  • 在 Angular中 使用 Lodash 的方法

    在 Angular中 使用 Lodash 的方法

    這篇文章主要介紹了在 Angular中 使用 Lodash 的方法,需要的朋友可以參考下
    2018-02-02
  • 淺析webapp框架AngularUI的demo

    淺析webapp框架AngularUI的demo

    這篇文章主要介紹了淺析webapp框架AngularUI的demo以及對demo的簡單修改,需要的朋友可以參考下
    2014-12-12
  • Angular 數據請求的實現方法

    Angular 數據請求的實現方法

    本篇文章主要介紹了Angular 數據請求的實現方法,小編覺得挺不錯的,現在分享給大家,也給大家做個參考。一起跟隨小編過來看看吧
    2018-05-05
  • Angular4.0中引入laydate.js日期插件的方法教程

    Angular4.0中引入laydate.js日期插件的方法教程

    在AngularJs中我們會不可避免的使用第三方庫,例如jquery插件庫。下面這篇文章主要給大家介紹了關于Angular4.0中引入laydate.js日期插件的相關資料,需要的朋友可以參考借鑒,下面隨著小編來一起學習學習吧。
    2017-12-12
  • AngularJS中filter的使用實例詳解

    AngularJS中filter的使用實例詳解

    這篇文章主要介紹了AngularJS中filter的使用實例詳解的相關資料,這里提供實例幫助大家理解掌握,希望能幫助到大家,需要的朋友可以參考下
    2017-08-08
  • AngularJS表格樣式簡單設置方法示例

    AngularJS表格樣式簡單設置方法示例

    這篇文章主要介紹了AngularJS表格樣式簡單設置方法,結合實例形式分析了AngularJS結合bootstrap針對表格樣式的相關設置技巧,需要的朋友可以參考下
    2017-03-03
  • 簡述AngularJS相關的一些編程思想

    簡述AngularJS相關的一些編程思想

    這篇文章主要介紹了AngularJS相關的一些編程思想,AngularJS是一款熱門的JavaScript庫,推薦!需要的朋友可以參考下
    2015-06-06
  • angular4應用中輸入的最小值和最大值的方法

    angular4應用中輸入的最小值和最大值的方法

    這篇文章主要介紹了angular4應用中輸入的最小值和最大值的方法,小編覺得挺不錯的,現在分享給大家,也給大家做個參考。一起跟隨小編過來看看吧
    2019-05-05
  • Angular Universal服務器端渲染避免 window is not defined錯誤消息

    Angular Universal服務器端渲染避免 window is not&

    這篇文章主要介紹了Angular Universal服務器端渲染避免 window is not defined錯誤消息,有需要的朋友可以借鑒參考下,希望能夠有所幫助,祝大家多多進步,早日升職加薪
    2023-07-07

最新評論

东平县| 青冈县| 临安市| 揭东县| 河间市| 永吉县| 甘洛县| 类乌齐县| 金门县| 德令哈市| 获嘉县| 咸丰县| 綦江县| 鹤峰县| 渝中区| 大姚县| 松滋市| 汕尾市| 永丰县| 崇明县| 车险| 德令哈市| 虹口区| 谢通门县| 汝州市| 花莲县| 大安市| 镇沅| 榆林市| 锡林浩特市| 安顺市| 双桥区| 清徐县| 深水埗区| 黔江区| 汶上县| 盘山县| 安丘市| 乌鲁木齐县| 鲁甸县| 高台县|