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 ] } }
《L05 电商实战》
从零开发一个电商项目,功能包括电商后台、商品 & SKU 管理、购物车、订单管理、支付宝支付、微信支付、订单退款流程、优惠券等
《G01 Go 实战入门》
从零开始带你一步步开发一个 Go 博客项目,让你在最短的时间内学会使用 Go 进行编码。项目结构很大程度上参考了 Laravel。
讨论数量: 1

已经解决,
webpack包不对、

网上很多demo都是

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

还需要

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

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