AWS Amplify
To use jupyter-react in Amplify, you need to make some changes to the build process and the Node versions.
After setting up your repository, follow these steps:
- In your repository's App Settings, navigate to the Build settings tab.
- Locate the App build specification section, which contains the amplify.yml file editor. This file manages the build settings.
- Click the Edit button to modify the amplify.yml file.
- Replace the existing content with the following code to use Yarn v3 instead of npm:
version: 1
frontend:
phases:
preBuild:
commands:
- corepack enable
- yarn set version stable
- yarn install
build:
commands:
- yarn run build
artifacts:
baseDirectory: .next
files:
- '**/*'
cache:
paths:
- node_modules/**/*
- Save the changes to the amplify.yml file.
- Scroll down to the Edit build image settings section and click Edit.
- By default, it uses Node version 16.0, which may not work correctly. Set the build image to node:18.17.3 (or your preferred Node version).
- Save the changes.
Once you've completed these steps, the next time you push to the main branch or the branch you've configured in Amplify, it will use these updated build settings. Your Amplify setup should work as expected.