ps-serverless-app
ps-serverless-app copied to clipboard
TypeError: Cannot read properties of undefined (reading 'apiEndpoint')
Hi Dave,
first of all a big Thank You for your work !!! best in class!!!
Trying to start the webapp (on "Implementing Serverless Web Application Hosting and Delivery on AWS") on the p1 branch, I get:
Module.<anonymous>
src/services/index.js:5
2 | import createAuthRefreshInterceptor from 'axios-auth-refresh';
3 | import { Auth } from 'aws-amplify';
4 |
> 5 | const SERVICES_HOST = window.appConfig.apiEndpoint;
6 | let client;
7 |
8 | /* eslint-disable no-console */
View compiled
./src/services/index.js
http://localhost:3000/static/js/main.chunk.js:3459:30
__webpack_require__
/home/trxrse/projects/ps-serverless-app/webapp/webpack/bootstrap:856
853 |
854 | __webpack_require__.$Refresh$.init();
855 | try {
> 856 | modules[moduleId].call(module.exports, module, module.exports, hotCreateRequire(moduleId));
| ^ 857 | } finally {
858 | __webpack_require__.$Refresh$.cleanup(moduleId);
859 | }
Any idea?
Thanks Remus
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.
I am also facing the same issue, any workaround? @davidtucker