添加链接
link之家
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接
Collectives™ on Stack Overflow

Find centralized, trusted content and collaborate around the technologies you use most.

Learn more about Collectives

Teams

Q&A for work

Connect and share knowledge within a single location that is structured and easy to search.

Learn more about Teams

Module not found: Error: Can't resolve 'vue-axios' in 'C:\xampp\htdocs\vue-laravel-api\resources\js'

Ask Question

I am working in a crud with Laravel and Vue.js I have installed all dev devDependencies when I run NPM run watch me display this error as being:

In file app.js, I have included all dependencies:

import "./bootstrap";
import vue from "vue";
window.Vue = vue;
import App from "./components/App.vue";
import VueRouter from "vue-router";
import VueAxios from "vue-axios";
import axios from "axios";
import { routes } from "./routes";
Vue.use(VueRouter);
Vue.use(VueAxios, axios);
const router = new VueRouter({
    mode: "history",
    routes: routes,
const app = new Vue({
    el: "#app",
    router: router,
    render: (h) => h(App),
Can anyone help me with error above, how to solve it?

Did you add axios and vue-axios packages to package.json or did you install these packages? It looks you're not. You need to install them with below;

npm i axios
npm i vue-axios
        

Thanks for contributing an answer to Stack Overflow!

  • Please be sure to answer the question. Provide details and share your research!

But avoid

  • Asking for help, clarification, or responding to other answers.
  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers.