Gulp Command Fails looking for buble package?

Published 2 years ago by tankerkiller125

I get the following error when running the gulp command

[16:49:44] Using gulpfile /var/www/opendevs/manager/gulpfile.js
[16:49:44] Starting 'all'...
[16:49:44] Starting 'sass'...
[16:49:45] Finished 'sass' after 943 ms
[16:49:45] Starting 'webpack'...
{ [Error: Entry module not found: Error: Can't resolve 'buble' in '/var/www/opendevs/manager'
resolve 'buble' in '/var/www/opendevs/manager'
  Parsed request is a module
  using description file: /var/www/opendevs/manager/package.json (relative path: .)
  after using description file: /var/www/opendevs/manager/package.json (relative path: .)
    resolve as module
      module variation buble-loader
        /var/www/opendevs/node_modules doesn't exist or is not a directory
        /var/www/node_modules doesn't exist or is not a directory
        /var/node_modules doesn't exist or is not a directory
        /node_modules doesn't exist or is not a directory
        looking for modules in /var/www/opendevs/manager/node_modules
          using description file: /var/www/opendevs/manager/package.json (relative path: ./node_modules)
          after using description file: /var/www/opendevs/manager/package.json (relative path: ./node_modules)
            using description file: /var/www/opendevs/manager/package.json (relative path: ./node_modules/buble-loader)
              as directory
                /var/www/opendevs/manager/node_modules/buble-loader doesn't exist
              no extension
                /var/www/opendevs/manager/node_modules/buble-loader doesn't exist
              .js
                /var/www/opendevs/manager/node_modules/buble-loader.js doesn't exist
              .json
                /var/www/opendevs/manager/node_modules/buble-loader.json doesn't exist
      /var/www/opendevs/node_modules doesn't exist or is not a directory
      /var/www/node_modules doesn't exist or is not a directory
      /var/node_modules doesn't exist or is not a directory
      /node_modules doesn't exist or is not a directory
      looking for modules in /var/www/opendevs/manager/node_modules
        using description file: /var/www/opendevs/manager/package.json (relative path: ./node_modules)
        after using description file: /var/www/opendevs/manager/package.json (relative path: ./node_modules)
          using description file: /var/www/opendevs/manager/package.json (relative path: ./node_modules/buble)
            as directory
              /var/www/opendevs/manager/node_modules/buble doesn't exist
            no extension
              /var/www/opendevs/manager/node_modules/buble doesn't exist
            .js
              /var/www/opendevs/manager/node_modules/buble.js doesn't exist
            .json
              /var/www/opendevs/manager/node_modules/buble.json doesn't exist]
  message: 'Entry module not found: Error: Can\'t resolve \'buble\' in \'/var/www/opendevs/manager\'\nresolve \'buble\' in \'/var/www/opendevs/manager\'\n  Parsed request is a module\n  using description file: /var/www/opendevs/manager/package.json (relative path: .)\n  after using description file: /var/www/opendevs/manager/package.json (relative path: .)\n    resolve as module\n      module variation buble-loader\n        /var/www/opendevs/node_modules doesn\'t exist or is not a directory\n        /var/www/node_modules doesn\'t exist or is not a directory\n        /var/node_modules doesn\'t exist or is not a directory\n        /node_modules doesn\'t exist or is not a directory\n        looking for modules in /var/www/opendevs/manager/node_modules\n          using description file: /var/www/opendevs/manager/package.json (relative path: ./node_modules)\n          after using description file: /var/www/opendevs/manager/package.json (relative path: ./node_modules)\n            using description file: /var/www/opendevs/manager/package.json (relative path: ./node_modules/buble-loader)\n              as directory\n                /var/www/opendevs/manager/node_modules/buble-loader doesn\'t exist\n              no extension\n                /var/www/opendevs/manager/node_modules/buble-loader doesn\'t exist\n              .js\n                /var/www/opendevs/manager/node_modules/buble-loader.js doesn\'t exist\n              .json\n                /var/www/opendevs/manager/node_modules/buble-loader.json doesn\'t exist\n      /var/www/opendevs/node_modules doesn\'t exist or is not a directory\n      /var/www/node_modules doesn\'t exist or is not a directory\n      /var/node_modules doesn\'t exist or is not a directory\n      /node_modules doesn\'t exist or is not a directory\n      looking for modules in /var/www/opendevs/manager/node_modules\n        using description file: /var/www/opendevs/manager/package.json (relative path: ./node_modules)\n        after using description file: /var/www/opendevs/manager/package.json (relative path: ./node_modules)\n          using description file: /var/www/opendevs/manager/package.json (relative path: ./node_modules/buble)\n            as directory\n              /var/www/opendevs/manager/node_modules/buble doesn\'t exist\n            no extension\n              /var/www/opendevs/manager/node_modules/buble doesn\'t exist\n            .js\n              /var/www/opendevs/manager/node_modules/buble.js doesn\'t exist\n            .json\n              /var/www/opendevs/manager/node_modules/buble.json doesn\'t exist',
  showStack: false,
  showProperties: true,
  plugin: 'webpack-stream',
  __safety: { toString: [Function: bound ] } }

I am running: nodejs: 6.5.0 npm: 3.10.3

Any help is greatly appreciated.

Best Answer (As Selected By tankerkiller125)
ejdelmonico

Well, I can say that I have a had my fare share of issues with npm installs in Laravel projects over the past year. If I can not immediately and the issue, I usually just rm -rf node_modules and npm install. that usually fixes my issues. However, with Laravel 5.3, I had to npm install -g webpack buble buble-loader babel babel-preset-es2015.

ejdelmonico

npm install -g buble buble-loader

jfweller@web.de

@ejdelmonico I have the same issue.. .if i try to install buble-loader I get the following error:

npm WARN [email protected] requires a peer of [email protected] || ^2.1.0-beta but none was installed.

I tried to do the following npm install [email protected] but this doesn't help.

My package.json looks like the following:

{ "private": true, "scripts": { "prod": "gulp --production", "dev": "gulp watch" }, "devDependencies": { "bootstrap-sass": "^3.3.7", "gulp": "^3.9.1", "jquery": "^3.1.0", "laravel-elixir": "^6.0.0-9", "laravel-elixir-vue": "^0.1.4", "laravel-elixir-webpack-official": "^1.0.2", "lodash": "^4.14.0", "vue": "^1.0.26", "vue-resource": "^0.9.3" } }

Do you have any idea? Thanks!

Nyratas

Just had the same issues.

I tried installing manually everything that was missing one at the time : npm install webpack, followed by npm install buble and then it appeared I also had to npm install babel.

But I got this error :

Error: Module '[...]\node_modules\buble\dist\buble.umd.js' is not a loader (must have normal or pitch function)

I looked a bit on the forums and found this thread. As weird as it can be, it just worked for me. Remove the node_modules directory from your project and re-run npm install.

I think it comes from some updates that occured during the first install, but I'm not sure at all what's going on here.

ejdelmonico

Well, I can say that I have a had my fare share of issues with npm installs in Laravel projects over the past year. If I can not immediately and the issue, I usually just rm -rf node_modules and npm install. that usually fixes my issues. However, with Laravel 5.3, I had to npm install -g webpack buble buble-loader babel babel-preset-es2015.

jfweller@web.de

@Nyrata doesn't work for me.. I tried it more than 8 times with always a fresh project. I switched to 5.2 now.

tankerkiller125

Thanks @ejdelmonico the last command there worked perfectly :)

nate.a.johnson

Be careful installing anything globally. You will probably run into issues in other projects down the line that you forgot you installed an old dependency globally. The only thing I would install globally is a command line install tool, and that can still lead to issues.

Don't just run commands blindly, you will regret it later if you don't know what you are doing. Also don't run them with sudo... if you need sudo, you probably just don't have your permissions set up appropriately.

patwadden

Had this problem to. I had 2 different machines with the same project, worked on one, not on the other. One was installing a completely different set of packages. Turned out I just needed to update npm (npm install [email protected] -g).

jonahpatriarche

I tried everything I could find for this problem

  • updated npm
  • updated nodejs
  • installed buble, buble-loader, webpack individually
  • deleted node_modules
  • ran npm install again
  • restarted my machine

NOTHING WORKED.... until I read the nam install log for laravel-elixir-webpack-offical, which reads UNMET PEER DEPENCY [email protected] but npm was installing v0.15.2

So I tried npm install [email protected] and reran npm install. And it worked.

Please sign in or create an account to participate in this conversation.