$ npm install -g @aws-amplify/cli
npm warn deprecated inflight@1.0.6: This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.
npm warn deprecated rimraf@3.0.2: Rimraf versions prior to v4 are no longer supported
npm warn deprecated glob@7.2.3: Glob versions prior to v9 are no longer supported
$ npm install lru-cache
$ npm install rimraf@10
$ npm install rimraf@5
$ npm uinstall -g @aws-amplify/cli
$ npm cache clean --force
//
$ npm uninstall -g @aws-amplify/cli
$ npm install -g @aws-amplify/cli
$ amplify -v
13.0.1
//依存ライブラリのVersionが古いとWaringが出たので以下を実行して、各ライブラリのバージョン確認
$ npm audit fix
$ npm view glob version
nodejs version up
$ nvm ls-remote --lts
$ nvm install 22.15.1
$ nvm ls // インストールしたバージョン一覧と現在使用のバージョン確認
$ nvm use 22.15.1 // Version指定して切り替える方法
$ ng new amplify-angular-app
Would you like to enable autocompletion? This will set up your terminal so pressing TAB while typing Angular CLI commands will show possible options
and autocomplete arguments. (Enabling autocompletion will modify configuration files in your home directory.) yes
Appended `source <(ng completion script)` to `/home/ichiri/.bashrc`. Restart your terminal or run the following to autocomplete `ng` commands:
source <(ng completion script)
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.dev/cli/analytics.
no
Global setting: disabled
Local setting: No local workspace configuration file.
Effective status: disabled
? Which stylesheet format would you like to use? CSS [ https://developer.mozilla.org/docs/Web/CSS ]
? Do you want to enable Server-Side Rendering (SSR) and Static Site Generation (SSG/Prerendering)? no
CREATE amplify-angular-app/README.md (1078 bytes)
CREATE amplify-angular-app/.editorconfig (274 bytes)
CREATE amplify-angular-app/.gitignore (587 bytes)
CREATE amplify-angular-app/angular.json (2642 bytes)
CREATE amplify-angular-app/package.json (1051 bytes)
CREATE amplify-angular-app/tsconfig.json (1012 bytes)
CREATE amplify-angular-app/tsconfig.app.json (424 bytes)
CREATE amplify-angular-app/tsconfig.spec.json (434 bytes)
CREATE amplify-angular-app/.vscode/extensions.json (130 bytes)
CREATE amplify-angular-app/.vscode/launch.json (470 bytes)
CREATE amplify-angular-app/.vscode/tasks.json (938 bytes)
CREATE amplify-angular-app/src/main.ts (250 bytes)
CREATE amplify-angular-app/src/index.html (303 bytes)
CREATE amplify-angular-app/src/styles.css (80 bytes)
CREATE amplify-angular-app/src/app/app.component.css (0 bytes)
CREATE amplify-angular-app/src/app/app.component.html (19903 bytes)
CREATE amplify-angular-app/src/app/app.component.spec.ts (955 bytes)
CREATE amplify-angular-app/src/app/app.component.ts (315 bytes)
CREATE amplify-angular-app/src/app/app.config.ts (310 bytes)
CREATE amplify-angular-app/src/app/app.routes.ts (77 bytes)
CREATE amplify-angular-app/public/favicon.ico (15086 bytes)
✔ Packages installed successfully.
hint: Using 'master' as the name for the initial branch. This default branch name
hint: is subject to change. To configure the initial branch name to use in all
hint: of your new repositories, which will suppress this warning, call:
hint:
hint: git config --global init.defaultBranch <name>
hint:
hint: Names commonly chosen instead of 'master' are 'main', 'trunk' and
hint: 'development'. The just-created branch can be renamed via this command:
hint:
hint: git branch -m <name>
Author identity unknown
*** Please tell me who you are.
Run
git config --global user.email "you@example.com"
git config --global user.name "Your Name"
to set your account's default identity.
Omit --global to set the identity only in this repository.
fatal: unable to auto-detect email address (got 'ichiri@PC-.(none)')
(19.2.12の場合)
ng new amplify-angular-appとすると (実際は新しいアプリ『angular-fp0h-rag』とした)
$ cd amplify-angular-app
$ amplify init
Note: It is recommended to run this command from the root of your app directory
? Enter a name for the project s3towebAmpAng
The following configuration will be applied:
Project information
| Name: s3towebAmpAng
| Environment: dev
| Default editor: Visual Studio Code
| App type: javascript
| Javascript framework: angular
| Source Directory Path: src
| Distribution Directory Path: dist
| Build Command: npm run-script build
| Start Command: ng serve
? Initialize the project with the above configuration? Yes
Using default provider awscloudformation
? Select the authentication method you want to use: AWS profile
For more information on AWS Profiles, see:
? Please choose the profile you want to use default
Adding backend environment dev to AWS Amplify app: d3of7jk86pirg0
Deployment completed.
Deploying root stack s3towebAmpAng [ ==========------------------------------ ] 1/4
amplify-s3towebampang-dev-ea4… AWS::CloudFormation::Stack CREATE_IN_PROGRESS Mon Sep 02 2024 16:47:26…
AuthRole AWS::IAM::Role CREATE_IN_PROGRESS Mon Sep 02 2024 16:47:29…
DeploymentBucket AWS::S3::Bucket CREATE_COMPLETE Mon Sep 02 2024 16:47:44…
UnauthRole AWS::IAM::Role CREATE_IN_PROGRESS Mon Sep 02 2024 16:47:29…
✔ Help improve Amplify CLI by sharing non-sensitive project configurations on failures (y/N) · no
You can always opt-in by running "amplify configure --share-project-config-on"
Deployment state saved successfully.
✔ Initialized provider successfully.
✅ Initialized your environment successfully.
✅ Your project has been successfully initialized and connected to the cloud!
Some next steps:
"amplify status" will show you what you've added already and if it's locally configured or deployed
"amplify add <category>" will allow you to add features like user login or a backend API
"amplify push" will build all your local backend resources and provision it in the cloud
"amplify console" to open the Amplify Console and view your project status
"amplify publish" will build all your local backend and frontend resources (if you have hosting category added) and provision it in the cloud
Pro tip:
Try "amplify add api" to create a backend API and then "amplify push" to deploy everything
$ amplify add storage mybucket-tokyo-ichiri-s3toweb
? Select from one of the below mentioned services: Content (Images, audio, video, etc.)
✔ You need to add auth (Amazon Cognito) to your project in order to add storage for user files. Do you want to add auth now? (Y/n) · yes
Using service: Cognito, provided by: awscloudformation
The current configured provider is Amazon Cognito.
Do you want to use the default authentication and security configuration? Default configuration
Warning: you will not be able to edit these selections.
How do you want users to be able to sign in? Username
Do you want to configure advanced settings? No, I am done.
✅ Successfully added auth resource s3towebampang51eb8fe1 locally
✅ Some next steps:
"amplify push" will build all your local backend resources and provision it in the cloud
"amplify publish" will build all your local backend and frontend resources (if you have hosting category added) and provision it in the cloud
✔ Provide a friendly name for your resource that will be used to label this category in the project: · s3toWEB
✔ Provide bucket name: · mybucket-tokyo-ichiri-s3toweb
✔ Who should have access: · Auth and guest users
✔ What kind of access do you want for Authenticated users? · create/update, read, delete
✔ What kind of access do you want for Guest users? · read
✔ Do you want to add a Lambda Trigger for your S3 Bucket? (y/N) · no
⚠️ Specified resource configuration requires Cognito Identity Provider unauthenticated access but it is not enabled.
✅ Successfully updated auth resource locally.
✅ Successfully added resource s3toWEB locally
⚠️ If a user is part of a user pool group, run "amplify update storage" to enable IAM group policies for CRUD operations
✅ Some next steps:
"amplify push" builds all of your local backend resources and provisions them in the cloud
"amplify publish" builds all of your local backend and front-end resources (if you added hosting category) and provisions them in the cloud
$ npm install aws-amplify @aws-amplify/ui-angular
npm notice Beginning October 4, 2021, all connections to the npm registry - including for package installation - must use TLS 1.2 or higher. You are currently using plaintext http to connect. Please visit the GitHub blog for more information: https://github.blog/2021-08-23-npm-registry-deprecating-tls-1-0-tls-1-1/
npm notice Beginning October 4, 2021, all connections to the npm registry - including for package installation - must use TLS 1.2 or higher. You are currently using plaintext http to connect. Please visit the GitHub blog for more information: https://github.blog/2021-08-23-npm-registry-deprecating-tls-1-0-tls-1-1/
added 176 packages in 47s
153 packages are looking for funding
run `npm fund` for details
コメント