让我们在AWS Cloud9上构建Angular的开发环境

编辑历史

2020年11月29日初版(应用程序无法启动)

实际执行的命令。

    • cd environment/

 

    • npm install -g @angular/cli

 

    • ng new sample-angular-app

 

    • CSSの形式を選択

 

    ng serve
ec2-user:~ $ cd environment/
ec2-user:~/environment $ npm install -g @angular/cli

npm WARN deprecated debug@4.2.0: Debug versions >=3.2.0 <3.2.7 || >=4 <4.3.1 have a low-severity ReDos regression when used in a Node.js environment. It is recommended you upgrade to 3.2.7 or 4.3.1. (https://github.com/visionmedia/debug/issues/797)
npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated har-validator@5.1.5: this library is no longer supported
/home/ec2-user/.nvm/versions/node/v10.23.0/bin/ng -> /home/ec2-user/.nvm/versions/node/v10.23.0/lib/node_modules/@angular/cli/bin/ng

> @angular/cli@11.0.2 postinstall /home/ec2-user/.nvm/versions/node/v10.23.0/lib/node_modules/@angular/cli
> node ./bin/postinstall/script.js

? Would you like to share anonymous usage data 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 http://angular.io/analytics. Yes

Thank you for sharing anonymous usage data. If you change your mind, the following
command will disable this feature entirely:

    ng analytics off

+ @angular/cli@11.0.2
added 253 packages from 201 contributors in 22.622s

ec2-user:~/environment $ ng new sample-angular-app
? Do you want to enforce stricter type checking and stricter bundle budgets in the workspace?
  This setting helps improve maintainability and catch bugs ahead of time.
  For more information, see https://angular.io/strict Yes
? Would you like to add Angular routing? Yes
? Which stylesheet format would you like to use? CSS
CREATE sample-angular-app/README.md (1025 bytes)
CREATE sample-angular-app/.editorconfig (274 bytes)
CREATE sample-angular-app/.gitignore (631 bytes)
CREATE sample-angular-app/angular.json (3719 bytes)
CREATE sample-angular-app/package.json (1208 bytes)
CREATE sample-angular-app/tsconfig.json (737 bytes)
CREATE sample-angular-app/tslint.json (3185 bytes)
CREATE sample-angular-app/.browserslistrc (703 bytes)
CREATE sample-angular-app/karma.conf.js (1113 bytes)
CREATE sample-angular-app/tsconfig.app.json (287 bytes)
CREATE sample-angular-app/tsconfig.spec.json (333 bytes)
CREATE sample-angular-app/src/favicon.ico (948 bytes)
CREATE sample-angular-app/src/index.html (302 bytes)
CREATE sample-angular-app/src/main.ts (372 bytes)
CREATE sample-angular-app/src/polyfills.ts (2826 bytes)
CREATE sample-angular-app/src/styles.css (80 bytes)
CREATE sample-angular-app/src/test.ts (753 bytes)
CREATE sample-angular-app/src/assets/.gitkeep (0 bytes)
CREATE sample-angular-app/src/environments/environment.prod.ts (51 bytes)
CREATE sample-angular-app/src/environments/environment.ts (662 bytes)
CREATE sample-angular-app/src/app/app-routing.module.ts (245 bytes)
CREATE sample-angular-app/src/app/app.module.ts (393 bytes)
CREATE sample-angular-app/src/app/app.component.css (0 bytes)
CREATE sample-angular-app/src/app/app.component.html (25757 bytes)
CREATE sample-angular-app/src/app/app.component.spec.ts (1093 bytes)
CREATE sample-angular-app/src/app/app.component.ts (222 bytes)
CREATE sample-angular-app/e2e/protractor.conf.js (904 bytes)
CREATE sample-angular-app/e2e/tsconfig.json (274 bytes)
CREATE sample-angular-app/e2e/src/app.e2e-spec.ts (669 bytes)
CREATE sample-angular-app/e2e/src/app.po.ts (274 bytes)
⠇ Installing packages (npm)...
    読みこみ(1分くらい)
.
.
.

✔ Packages installed successfully.
    Successfully initialized git.
ec2-user:~/environment/sample-angular-app (master) $ ng serve
? Would you like to share anonymous 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 http://angular.io/analytics. Yes

Thank you for sharing anonymous usage data. Would you change your mind, the following
command will disable this feature entirely:

    ng analytics project off

Compiling @angular/core : es2015 as esm2015
Compiling @angular/common : es2015 as esm2015
Compiling @angular/platform-browser : es2015 as esm2015
Compiling @angular/platform-browser-dynamic : es2015 as esm2015
Compiling @angular/router : es2015 as esm2015
✔ Browser application bundle generation complete.

Initial Chunk Files | Names         |      Size
vendor.js           | vendor        |   2.65 MB
polyfills.js        | polyfills     | 141.30 kB
main.js             | main          |  59.57 kB
runtime.js          | runtime       |   6.15 kB
styles.css          | styles        | 119 bytes

                    | Initial Total |   2.85 MB

Build at: 2020-11-29T03:05:01.936Z - Hash: 17942e8011a7f3f95453 - Time: 13784ms

** Angular Live Development Server is listening on localhost:4200, open your browser on http://localhost:4200/ **


✔ Compiled successfully.
✔ Browser application bundle generation complete.

Initial Chunk Files | Names  |      Size
styles.css          | styles | 119 bytes

4 unchanged chunks

Build at: 2020-11-29T03:05:03.640Z - Hash: 6e0a04f592b2325ab15c - Time: 1419ms

✔ Compiled successfully.

准备就绪

广告
将在 10 秒后关闭
bannerAds