亚洲香蕉成人av网站在线观看_欧美精品成人91久久久久久久_久久久久久久久久久亚洲_热久久视久久精品18亚洲精品_国产精自产拍久久久久久_亚洲色图国产精品_91精品国产网站_中文字幕欧美日韩精品_国产精品久久久久久亚洲调教_国产精品久久一区_性夜试看影院91社区_97在线观看视频国产_68精品久久久久久欧美_欧美精品在线观看_国产精品一区二区久久精品_欧美老女人bb

首頁 > 網站 > WEB開發 > 正文

記錄一些學習angular2中遇到的問題

2024-04-27 15:13:38
字體:
來源:轉載
供稿:網友

之前跟著angular2中文官網的教程做完了angular-tour-of-heroes這個demo,感覺沒學到的東西不多,或者說忘掉很多了.所以想著到angular2英文官網繼續學習.

問題一

我跟著CLI QUICKSTART快速建一個angular2的程序, 在全局安裝完Angular-CLI后,我測試創建一個新的項目,執行下面的命令:

ng new my-app

報了一大堆錯誤,第一個錯誤信息我沒有記錄下來了.記錄下解決方法,就是安裝python(我的是python2.7, 開始裝最新的python3.6.0解決不了問題),并且把python加到環境變量.

然后ng new my-app, 報了下面的錯誤:

$ ng new angular-templateAs a forewarning, we are moving the CLI npm package to "@angular/cli" with the next release,which will only support Node 6.9 and greater. This package will be officially dePRecatedshortly after.To disable this warning use "ng set --global warnings.packageDeprecation=false".installing ng2 create .editorconfig create README.md create src/app/app.component.CSS create src/app/app.component.html create src/app/app.component.spec.ts create src/app/app.component.ts create src/app/app.module.ts create src/assets/.gitkeep create src/environments/environment.prod.ts create src/environments/environment.ts create src/favicon.ico create src/index.html create src/main.ts create src/polyfills.ts create src/styles.css create src/test.ts create src/tsconfig.json create angular-cli.json create e2e/app.e2e-spec.ts create e2e/app.po.ts create e2e/tsconfig.json create .gitignore create karma.conf.js create package.json create protractor.conf.js create tslint.jsonSuccessfully initialized git.Installing packages for tooling via npm.npm WARN deprecated minimatch@2.0.10: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issuenpm WARN deprecated minimatch@0.3.0: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issuenpm WARN prefer global node-gyp@3.5.0 should be installed with -gCannot download "https://github.com/sass/node-sass/releases/download/v4.5.0/win32-x64-51_binding.node":ESOCKETTIMEDOUTHint: If github.com is not accessible in your location try setting a proxy via HTTP_PROXY, e.g. export HTTP_PROXY=http://example.com:1234or configure npm proxy via npm config set proxy http://example.com:8080gyp info it worked if it ends with okgyp verb cli [ 'D://nodejs//node.exe',gyp verb cli 'H://Angular//angular-template//node_modules//node-gyp//bin//node-gyp.js',gyp verb cli 'rebuild',gyp verb cli '--verbose',gyp verb cli '--libsass_ext=',gyp verb cli '--libsass_cflags=',gyp verb cli '--libsass_ldflags=',gyp verb cli '--libsass_library=' ]gyp info using node-gyp@3.5.0gyp info using node@7.5.0 | win32 | x64gyp verb command rebuild []gyp verb command clean []gyp verb clean removing "build" directorygyp verb command configure []gyp verb check python checking for Python executable "python2" in the PATHgyp verb `which` failed Error: not found: python2gyp verb `which` failed at getNotFoundError (H:/Angular/angular-template/node_modules/which/which.js:13:12)gyp verb `which` failed at F (H:/Angular/angular-template/node_modules/which/which.js:68:19)gyp verb `which` failed at E (H:/Angular/angular-template/node_modules/which/which.js:80:29)gyp verb `which` failed at H:/Angular/angular-template/node_modules/which/which.js:89:16gyp verb `which` failed at H:/Angular/angular-template/node_modules/isexe/index.js:44:5gyp verb `which` failed at H:/Angular/angular-template/node_modules/isexe/windows.js:29:5gyp verb `which` failed at FSReqWrap.oncomplete (fs.js:112:15)gyp verb `which` failed python2 { Error: not found: python2gyp verb `which` failed at getNotFoundError (H:/Angular/angular-template/node_modules/which/which.js:13:12)gyp verb `which` failed at F (H:/Angular/angular-template/node_modules/which/which.js:68:19)gyp verb `which` failed at E (H:/Angular/angular-template/node_modules/which/which.js:80:29)gyp verb `which` failed at H:/Angular/angular-template/node_modules/which/which.js:89:16gyp verb `which` failed at H:/Angular/angular-template/node_modules/isexe/index.js:44:5gyp verb `which` failed at H:/Angular/angular-template/node_modules/isexe/windows.js:29:5gyp verb `which` failed at FSReqWrap.oncomplete (fs.js:112:15) code: 'ENOENT' }gyp verb check python checking for Python executable "python" in the PATHgyp verb `which` succeeded python D:/Python/Python27/python.EXEgyp verb check python version `D:/Python/Python27/python.EXE -c "import platform; print(platform.python_version());"` returned: "2.7.6/r/n"gyp verb get node dir no --target version specified, falling back to host node version: 7.5.0gyp verb command install [ '7.5.0' ]gyp verb install input version string "7.5.0"gyp verb install installing version: 7.5.0gyp verb install --ensure was passed, so won't reinstall if already installedgyp verb install version is already installed, need to check "installVersion"gyp verb got "installVersion" 9gyp verb needs "installVersion" 9gyp verb install version is goodgyp verb get node dir target node version installed: 7.5.0gyp verb build dir attempting to create "build" dir: H:/Angular/angular-template/node_modules/node-sass/buildgyp verb build dir "build" dir needed to be created? H:/Angular/angular-template/node_modules/node-sass/buildgyp verb build/config.gypi creating config filegyp verb build/config.gypi writing out config file: H:/Angular/angular-template/node_modules/node-sass/build/config.gypigyp verb config.gypi checking for gypi file: H:/Angular/angular-template/node_modules/node-sass/config.gypigyp verb common.gypi checking for gypi file: H:/Angular/angular-template/node_modules/node-sass/common.gypigyp verb gyp gyp format was not specified; forcing "msvs"gyp info spawn D:/Python/Python27/python.EXEgyp info spawn args [ 'H://Angular//angular-template//node_modules//node-gyp//gyp//gyp_main.py',gyp info spawn args 'binding.gyp',gyp info spawn args '-f',gyp info spawn args 'msvs',gyp info spawn args '-G',gyp info spawn args 'msvs_version=auto',gyp info spawn args '-I',gyp info spawn args 'H://Angular//angular-template//node_modules//node-sass//build//config.gypi',gyp info spawn args '-I',gyp info spawn args 'H://Angular//angular-template//node_modules//node-gyp//addon.gypi',gyp info spawn args '-I',gyp info spawn args 'C://Users//Administrator//.node-gyp//7.5.0//include//node//common.gypi',gyp info spawn args '-Dlibrary=shared_library',gyp info spawn args '-Dvisibility=default',gyp info spawn args '-Dnode_root_dir=C://Users//Administrator//.node-gyp//7.5.0',gyp info spawn args '-Dnode_gyp_dir=H://Angular//angular-template//node_modules//node-gyp',gyp info spawn args '-Dnode_lib_file=node.lib',gyp info spawn args '-Dmodule_root_dir=H://Angular//angular-template//node_modules//node-sass',gyp info spawn args '--depth=.',gyp info spawn args '--no-parallel',gyp info spawn args '--generator-output',gyp info spawn args 'H://Angular//angular-template//node_modules//node-sass//build',gyp info spawn args '-Goutput_dir=.' ]gyp verb command build []gyp verb build type Releasegyp verb architecture x64gyp verb node dev dir C:/Users/Administrator/.node-gyp/7.5.0gyp verb found first Solution file build/binding.slngyp verb could not find "msbuild.exe" in PATH - finding location in registrygyp verb "Release" dir needed to be created? nullgyp verb copying "node.lib" for x64 C:/Users/Administrator/.node-gyp/7.5.0/Release/node.libgyp info spawn C:/Windows/Microsoft.NET/Framework/v4.0.30319/msbuild.exegyp info spawn args [ 'build/binding.sln',gyp info spawn args '/nologo',gyp info spawn args '/p:Configuration=Release;Platform=x64' ]gyp ERR! build errorgyp ERR! stack Error: `C:/Windows/Microsoft.NET/Framework/v4.0.30319/msbuild.exe` failed with exit code: 1gyp ERR! stack at ChildProcess.onExit (H:/Angular/angular-template/node_modules/node-gyp/lib/build.js:276:23)gyp ERR! stack at emitTwo (events.js:106:13)gyp ERR! stack at ChildProcess.emit (events.js:192:7)gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:215:12)gyp ERR! System Windows_NT 6.1.7601gyp ERR! command "D://nodejs//node.exe" "H://Angular//angular-template//node_modules//node-gyp//bin//node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library="gyp ERR! cwd H:/Angular/angular-template/node_modules/node-sassgyp ERR! node -v v7.5.0gyp ERR! node-gyp -v v3.5.0gyp ERR! not okBuild failed with error code: 1npm WARN optional SKipPING OPTIONAL DEPENDENCY: fsevents@^1.0.0 (node_modules/chokidar/node_modules/fsevents):npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.0.17: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})npm ERR! Windows_NT 6.1.7601npm ERR! argv "D://nodejs//node.exe" "D://nodejs//node_modules//npm//bin//npm-cli.js" "install"npm ERR! node v7.5.0npm ERR! npm v4.1.2npm ERR! code ELIFECYCLEnpm ERR! node-sass@4.5.0 postinstall: `node scripts/build.js`npm ERR! Exit status 1npm ERR!npm ERR! Failed at the node-sass@4.5.0 postinstall script 'node scripts/build.js'.npm ERR! Make sure you have the latest version of node.js and npm installed.npm ERR! If you do, this is most likely a problem with the node-sass package,npm ERR! not with npm itself.npm ERR! Tell the author that this fails on your system:npm ERR! node scripts/build.jsnpm ERR! You can get information on how to open an issue for this project with:npm ERR! npm bugs node-sassnpm ERR! Or if that isn't available, you can get their info via:npm ERR! npm owner ls node-sassnpm ERR! There is likely additional logging output above.npm ERR! Please include the following file with any support request:npm ERR! H:/Angular/angular-template/npm-debug.logPackage install failed, see above.

這一大堆東西我也不知道是啥,google gyp ERR! stack Error: ` failed with exit code: 1后, 在這里找到了解決方法,我根據里面的方法. 首先, 我執行命令$ npm install -g node-gyp, 更新了node-gym, 并沒有效果. 然后, 我安裝了Windows SDK 7.1, 還是沒有效果. 最后, 安裝了Visual Studio 2013(這個東西有點大, 6.5G), 問題就得到了解決… 下面正確是姿勢:

$ ng new angular-templateAs a forewarning, we are moving the CLI npm package to "@angular/cli" with the next release,which will only support Node 6.9 and greater. This package will be officially deprecatedshortly after.To disable this warning use "ng set --global warnings.packageDeprecation=false".installing ng2 create .editorconfig create README.md create src/app/app.component.css create src/app/app.component.html create src/app/app.component.spec.ts create src/app/app.component.ts create src/app/app.module.ts create src/assets/.gitkeep create src/environments/environment.prod.ts create src/environments/environment.ts create src/favicon.ico create src/index.html create src/main.ts create src/polyfills.ts create src/styles.css create src/test.ts create src/tsconfig.json create angular-cli.json create e2e/app.e2e-spec.ts create e2e/app.po.ts create e2e/tsconfig.json create .gitignore create karma.conf.js create package.json create protractor.conf.js create tslint.jsonSuccessfully initialized git.Installing packages for tooling via npm.Installed packages for tooling via npm.Project 'angular-template' successfully created.
發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
亚洲香蕉成人av网站在线观看_欧美精品成人91久久久久久久_久久久久久久久久久亚洲_热久久视久久精品18亚洲精品_国产精自产拍久久久久久_亚洲色图国产精品_91精品国产网站_中文字幕欧美日韩精品_国产精品久久久久久亚洲调教_国产精品久久一区_性夜试看影院91社区_97在线观看视频国产_68精品久久久久久欧美_欧美精品在线观看_国产精品一区二区久久精品_欧美老女人bb
91在线无精精品一区二区| 丝袜一区二区三区| 成人免费网站在线观看| 欧美日韩在线看| 亚洲欧美国产一本综合首页| 亚洲淫片在线视频| 国产日本欧美一区| 日韩中文字幕精品| 精品福利在线视频| 亚洲欧美资源在线| 亚洲成色999久久网站| 国产热re99久久6国产精品| 亚洲专区国产精品| 国产美女主播一区| 亚洲美女性生活视频| 久久久久女教师免费一区| 国产视频一区在线| 久久久精品日本| 日韩最新免费不卡| 2021久久精品国产99国产精品| 亚洲人成网站777色婷婷| 久久久久久久91| 超碰精品一区二区三区乱码| 欧美综合第一页| 国产精品久久一区主播| 国产91成人在在线播放| 国产综合久久久久| 国产精品视频地址| 亚洲色图五月天| 成人h猎奇视频网站| 九九热精品视频国产| 成人福利免费观看| 亚洲级视频在线观看免费1级| 亚洲人成在线一二| 成人免费看黄网站| 91精品国产乱码久久久久久久久| 97国产真实伦对白精彩视频8| 亚洲欧美国产视频| 日韩精品亚洲视频| 亚洲高清在线观看| 成人免费激情视频| 久久久这里只有精品视频| 在线亚洲午夜片av大片| 成人淫片在线看| 91av在线影院| 91久久在线视频| 欧美精品久久久久久久免费观看| 日韩精品高清在线| 亚洲第一级黄色片| 亚洲第一精品福利| 国产成人精品久久二区二区91| 91精品国产沙发| 亚洲老头老太hd| 日韩av成人在线| 成人有码视频在线播放| 在线性视频日韩欧美| 国产亚洲精品美女久久久久| 亚洲精品99999| 亚洲一区二区三区xxx视频| 国产精品成人播放| www国产精品com| 亚洲最大成人网色| 国产精品吹潮在线观看| 欧美激情a∨在线视频播放| 国产成人avxxxxx在线看| 欧美成人精品一区二区三区| 欧美日韩国产成人在线观看| 国产精品久久久久久久久| 亚洲色图35p| 国产精品入口夜色视频大尺度| 欧美激情中文字幕乱码免费| 亚洲区一区二区| 欧美在线国产精品| 欧美高清在线视频观看不卡| 成人av在线亚洲| 成人性教育视频在线观看| 亚洲免费福利视频| 91免费视频网站| 久久久久久亚洲精品| 欧美黄色片视频| 国产精品一区二区av影院萌芽| 国产999精品视频| 国产欧美一区二区| 91禁外国网站| 久久久噜噜噜久久久| 国产一区二区三区网站| 日韩精品高清在线观看| 精品久久香蕉国产线看观看gif| 在线日韩精品视频| 亚洲成人精品久久久| 国产亚洲精品久久久久动| 欧美日韩国产中文精品字幕自在自线| 亚洲精品一区二区三区不| 97激碰免费视频| 国内精品国产三级国产在线专| 久久精品国产一区二区三区| 在线观看欧美日韩国产| 亚洲精品国产综合区久久久久久久| 午夜精品99久久免费| 亚洲日韩欧美视频| 亚洲男人天堂视频| 少妇激情综合网| 成人在线观看视频网站| 国产精品美女视频网站| 亚洲国内高清视频| 丝袜亚洲另类欧美重口| 中文字幕国产精品| 久久激情五月丁香伊人| 欧美激情在线观看| 久久久久久久久电影| 国产欧美最新羞羞视频在线观看| 久久久久久久久爱| 国产精品网站大全| 日韩欧美有码在线| 久久久久久久久久久免费| 黄色一区二区在线观看| 欧美丰满少妇xxxx| 日韩成人网免费视频| xvideos国产精品| 亚洲人成毛片在线播放| 91av视频导航| 欧美黑人视频一区| 国产精品99免视看9| 美日韩丰满少妇在线观看| 欧美精品少妇videofree| 亚洲天堂第二页| 国产成人短视频| 中国人与牲禽动交精品| 成人做爽爽免费视频| 亚洲午夜精品久久久久久性色| 在线视频免费一区二区| 成人444kkkk在线观看| 国产亚洲a∨片在线观看| 欧洲亚洲免费视频| 欧美在线亚洲在线| 国产+成+人+亚洲欧洲| 在线激情影院一区| 欧美大成色www永久网站婷| 亚洲美女精品久久| 国产欧美精品在线播放| 最新中文字幕亚洲| 欧美极品美女视频网站在线观看免费| 欧美交受高潮1| 国产美女久久精品| 欧美性20hd另类| 精品无人区乱码1区2区3区在线| 久久人人97超碰精品888| 久久免费视频在线观看| 97香蕉超级碰碰久久免费软件| 久久99久国产精品黄毛片入口| 国产欧美日韩中文字幕在线| 亚洲男人天堂2023| 欧美午夜美女看片| 超碰日本道色综合久久综合| 最新亚洲国产精品| 日韩av在线免费观看| 欧美最近摘花xxxx摘花| 亚洲色图第一页| 欧美日韩国产丝袜美女| 欧美性一区二区三区| 国产成人鲁鲁免费视频a| 91欧美视频网站| 欧美成aaa人片在线观看蜜臀| 国产精品成人一区|