Getting Uncaught TypeError: Vue is not a constructor while running the Tailwind Traders project

Sakshi Srirangam 11 Reputation points
2022-03-21T22:25:52.283+00:00

Getting Uncaught TypeError: Vue is not a constructor while running the Tailwind Traders project which is mentioned in the "Build Serverless APIs with Azure Functions" learning module. Due to this, after the complete setup, the page is not showing the data.
How can this be resolved?
''

185413-image.png

I also tried importing vue like this(changes in the first 2 lines):
import Vue from 'vue';
var foo = (function () {
(I then call foo(); in the end)
but I got the following error:
185386-image.png

Appreciate some help on this.

Azure Functions
Azure Functions
An Azure service that provides an event-driven serverless compute platform.
5,082 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Frédéric OGUER 56 Reputation points
    2022-05-17T10:02:43.413+00:00

    In the index.html file, force the VueJS version to 2, line 11 :

    <script src="https://cdn.jsdelivr.net/npm/vue@2.6.0"></script>
    
    11 people found this answer helpful.

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.