Laravel 里使用 vue 报错,求帮助

想尝试下laravel5.2里面用下vue,参照里网上的一个demo,做完发现报错里,不知道怎么解决
我把node_modules文件夹删除里,重新cnpm install 还是不行,有遇到过的大神吗?

var elixir = require('laravel-elixir');

elixir(function(mix) {
    mix.webpack('main.js');
});

执行gulp报错:

[17:07:26] Using gulpfile /srv/www/com.carbit/laravel_new/gulpfile.js
[17:07:26] Starting 'all'...
[17:07:26] Starting 'webpack'...
{ [Error: Entry module not found: Error: Can't resolve 'buble' in '/srv/www/com.carbit/laravel_new'
resolve 'buble' in '/srv/www/com.carbit/laravel_new'
  Parsed request is a module
  using description file: /srv/www/com.carbit/laravel_new/package.json (relative path: .)
  after using description file: /srv/www/com.carbit/laravel_new/package.json (relative path: .)
    resolve as module
      module variation buble-loader
        /srv/www/node_modules doesn't exist or is not a directory
        /srv/www/com.carbit/node_modules doesn't exist or is not a directory
        /node_modules doesn't exist or is not a directory
        /srv/node_modules doesn't exist or is not a directory
        looking for modules in /srv/www/com.carbit/laravel_new/node_modules
          using description file: /srv/www/com.carbit/laravel_new/package.json (relative path: ./node_modules)
          after using description file: /srv/www/com.carbit/laravel_new/package.json (relative path: ./node_modules)
            using description file: /srv/www/com.carbit/laravel_new/package.json (relative path: ./node_modules/buble-loader)
              as directory
                /srv/www/com.carbit/laravel_new/node_modules/buble-loader doesn't exist
              no extension
                /srv/www/com.carbit/laravel_new/node_modules/buble-loader doesn't exist
              .js
                /srv/www/com.carbit/laravel_new/node_modules/buble-loader.js doesn't exist
              .json
                /srv/www/com.carbit/laravel_new/node_modules/buble-loader.json doesn't exist
      /srv/www/node_modules doesn't exist or is not a directory
      /srv/www/com.carbit/node_modules doesn't exist or is not a directory
      /node_modules doesn't exist or is not a directory
      /srv/node_modules doesn't exist or is not a directory
      looking for modules in /srv/www/com.carbit/laravel_new/node_modules
        using description file: /srv/www/com.carbit/laravel_new/package.json (relative path: ./node_modules)
        after using description file: /srv/www/com.carbit/laravel_new/package.json (relative path: ./node_modules)
          using description file: /srv/www/com.carbit/laravel_new/package.json (relative path: ./node_modules/buble)
            as directory
              /srv/www/com.carbit/laravel_new/node_modules/buble doesn't exist
            no extension
              /srv/www/com.carbit/laravel_new/node_modules/buble doesn't exist
            .js
              /srv/www/com.carbit/laravel_new/node_modules/buble.js doesn't exist
            .json
              /srv/www/com.carbit/laravel_new/node_modules/buble.json doesn't exist]
  message: 'Entry module not found: Error: Can\'t resolve \'buble\' in \'/srv/www/com.carbit/laravel_new\'\nresolve \'buble\' in \'/srv/www/com.carbit/laravel_new\'\n  Parsed request is a module\n  using description file: /srv/www/com.carbit/laravel_new/package.json (relative path: .)\n  after using description file: /srv/www/com.carbit/laravel_new/package.json (relative path: .)\n    resolve as module\n      module variation buble-loader\n        /srv/www/node_modules doesn\'t exist or is not a directory\n        /srv/www/com.carbit/node_modules doesn\'t exist or is not a directory\n        /node_modules doesn\'t exist or is not a directory\n        /srv/node_modules doesn\'t exist or is not a directory\n        looking for modules in /srv/www/com.carbit/laravel_new/node_modules\n          using description file: /srv/www/com.carbit/laravel_new/package.json (relative path: ./node_modules)\n          after using description file: /srv/www/com.carbit/laravel_new/package.json (relative path: ./node_modules)\n            using description file: /srv/www/com.carbit/laravel_new/package.json (relative path: ./node_modules/buble-loader)\n              as directory\n                /srv/www/com.carbit/laravel_new/node_modules/buble-loader doesn\'t exist\n              no extension\n                /srv/www/com.carbit/laravel_new/node_modules/buble-loader doesn\'t exist\n              .js\n                /srv/www/com.carbit/laravel_new/node_modules/buble-loader.js doesn\'t exist\n              .json\n                /srv/www/com.carbit/laravel_new/node_modules/buble-loader.json doesn\'t exist\n      /srv/www/node_modules doesn\'t exist or is not a directory\n      /srv/www/com.carbit/node_modules doesn\'t exist or is not a directory\n      /node_modules doesn\'t exist or is not a directory\n      /srv/node_modules doesn\'t exist or is not a directory\n      looking for modules in /srv/www/com.carbit/laravel_new/node_modules\n        using description file: /srv/www/com.carbit/laravel_new/package.json (relative path: ./node_modules)\n        after using description file: /srv/www/com.carbit/laravel_new/package.json (relative path: ./node_modules)\n          using description file: /srv/www/com.carbit/laravel_new/package.json (relative path: ./node_modules/buble)\n            as directory\n              /srv/www/com.carbit/laravel_new/node_modules/buble doesn\'t exist\n            no extension\n              /srv/www/com.carbit/laravel_new/node_modules/buble doesn\'t exist\n            .js\n              /srv/www/com.carbit/laravel_new/node_modules/buble.js doesn\'t exist\n            .json\n              /srv/www/com.carbit/laravel_new/node_modules/buble.json doesn\'t exist',
  showStack: false,
  showProperties: true,
  plugin: 'webpack-stream',
  __safety: { toString: [Function: bound ] } }
《L04 微信小程序从零到发布》
从小程序个人账户申请开始,带你一步步进行开发一个微信小程序,直到提交微信控制台上线发布。
《L03 构架 API 服务器》
你将学到如 RESTFul 设计风格、PostMan 的使用、OAuth 流程,JWT 概念及使用 和 API 开发相关的进阶知识。
讨论数量: 1

已经解决,
webpack包不对、

网上很多demo都是

  "laravel-elixir-webpack-official": "^1.0.2",

还需要

  "laravel-elixir-webpack": "^1.0.1",
8年前 评论

讨论应以学习和精进为目的。请勿发布不友善或者负能量的内容,与人为善,比聪明更重要!