amazon-archives / aws-serverless-auth-reference-app

Serverless reference app and backend API, showcasing authentication and authorization patterns using Amazon Cognito, Amazon API Gateway, AWS Lambda, and AWS IAM.
Other
754 stars 193 forks source link

Vendor script reference seems to be missing (webpackjsonp is not defined) #31

Closed ehurtadog closed 6 years ago

ehurtadog commented 6 years ago

Hello,

First of all let me tell you that this lab rocks, it's simply awesome and very helpfull.

I'm new developing on this platform (Angular, Ionic & AWS) and I just want to share with you the problem I had before I could be able to run through the application.

I followed the steps in the Developer Guide to setup my local environment, and when I tried to load the application the response in the web browser was:

**Runtime Error**
webpackjsonp is not defined

**Stack**
@http://localhost:8100/build/main.js:1:1

Ionic Framework: 2.0.0-rc.1
Ionic Native: 2.2.3
Ionic App Scripts: 2.0.2
Angular Core: 2.0.0
Angular Compiler CLI: 0.6.2
Node: 6.11.1
OS Platform: Linux 4.8
Navigator Platform: Linux x86_64
User Agent: Mozilla/5.0

After some time searching on the forums I found out that the script reference to vendor.js was missing in the index.html, so I added the missing reference bellow the polyfills.js line:

<script src="build/polyfills.js"></script>
<script src="build/vendor.js"></script>

After that the application started working as expected.

Best regards

edukmattos commented 6 years ago

i have the error above:

Runtime Error Uncaught (in promise): cordova_not_available Stack Error: Uncaught (in promise): cordova_not_available at g (http://localhost:8100/build/polyfills.js:3:7133) at l (http://localhost:8100/build/polyfills.js:3:6251) at l (http://localhost:8100/build/polyfills.js:3:5937) at http://localhost:8100/build/polyfills.js:3:6765 at t.invokeTask (http://localhost:8100/build/polyfills.js:3:15213) at Object.onInvokeTask (http://localhost:8100/build/vendor.js:4496:37) at t.invokeTask (http://localhost:8100/build/polyfills.js:3:15134) at n.runTask (http://localhost:8100/build/polyfills.js:3:10390) at a (http://localhost:8100/build/polyfills.js:3:5313) at HTMLDocument.invoke (http://localhost:8100/build/polyfills.js:3:16210) Ionic Framework: 3.0.1 Ionic Native: ^2.9.0 Ionic App Scripts: 2.0.2 Angular Core: 4.0.0 Angular Compiler CLI: 4.0.0 Node: 6.11.0 OS Platform: Linux 4.4 Navigator Platform: Linux x86_64 User Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/59.0.3071.115 Safari/537.36

ehurtadog commented 6 years ago

Hello @ecmattos,

About this issue it seems that you don't have cordova in your app.

To see what's going on you should try npm outdated command in your app's folder to see your missing dependencies, after that you should try npm update command to bring all the missing stuff.

Regards

justonian commented 6 years ago

Please let us know if you're still encountering this issue after @ehurtadog suggestions above. Closing the issue for now, but happy to help, if you are experiencing any challenges.