After installing Vuejs in the servicestack then run the project it shows error like this.kindly give a solutions
1 Answer
It looks like you haven’t run ‘npm install’ in your AppHost project. You can do this via Visual Studio by right clicking of ‘package.json’ and selecting “Restore Packages” or by running the command as normal using the windows command prompt.
The best template to use for a Vue Single Page Application (SPA) and ServiceStack is the one from the ServiceStack x tool.
Installing the x tool can be done using the command
dotnet tool install -g x
Once installed, you can create a new Vue SPA project but using the command
x new vue-spa ExampleApp
Where ExampleApp is the name you give your application.
Once installed, using a command prompt, navigate into the new project folder and the AppHost to run the npm install command.
cd ExampleApp
cd ExampleApp
npm install
More details about the template are available in the ServiceStack docs, and a walk through video tutorial using the template is available on the ServiceStack YouTube channel.