ps-serverless-app
ps-serverless-app copied to clipboard
Some issues encountered: Tools and runtime error
npm -v: 9.5.1 npx -v: 9.5.1 yarn -v: 1.22.19 and eventually, cdk --version: 2.79.1 (build 2e7f8b7)
I am guessing that these are down to the vagaries of Node dependencies, not any shortcoming in the demo code itself :-D
- To install CDK, requires
sudo npm install -g aws-cdk
- not the command shown in the course (which fails). And justnpx cdk bootstrap aws://<account>/<region>
- The first run of
yarn
brings up a list of warnings, which are not present on a second run. Maybe the "fixes" contribute to 3 ? - To successfully run the web app (
yarn start
) from p1 to p2, requires:export NODE_OPTIONS=--openssl-legacy-provider
due toerror:03000086:digital envelope routines
- From p3 onwards, run-time error on
yarn start
(TypeError: Cannot read properties of undefined (reading 'apiEndpoint')) caused bywebapp/src/services/index.js: const SERVICES_HOST = window.appConfig.apiEndpoint
OK: Got it - the appconfig tools require the value from a deployment bucket, which is not present in a "yarn start" environment. Hence it maybe could detect it's running in that environment.