Vue-select: Error: Couldn't find preset "stage-2" relative to directory

Created on 8 Jun 2016  路  3Comments  路  Source: sagalbot/vue-select

I'm running webpack and this is the error I'm getting. I don't know if it is a babel error or vue-select error

[ERROR in ./~/babel-loader!./~/vue-loader/lib/selector.js?type=script&index=0!./~/vue-select/src/components/Select.vue
Module build failed: Error: Couldn't find preset "stage-2" relative to directory "/Users/rodrigo/work/src/gitlab.com/rodzzlessa24/hairbuddy/webapp/node_modules/vue-select"
    at /Users/rodrigo/work/src/gitlab.com/rodzzlessa24/hairbuddy/webapp/node_modules/babel-core/lib/transformation/file/options/option-manager.js:413:17
    at Array.map (native)
    at OptionManager.resolvePresets (/Users/rodrigo/work/src/gitlab.com/rodzzlessa24/hairbuddy/webapp/node_modules/babel-core/lib/transformation/file/options/option-manager.js:405:20)
    at OptionManager.mergePresets (/Users/rodrigo/work/src/gitlab.com/rodzzlessa24/hairbuddy/webapp/node_modules/babel-core/lib/transformation/file/options/option-manager.js:388:10)
    at OptionManager.mergeOptions (/Users/rodrigo/work/src/gitlab.com/rodzzlessa24/hairbuddy/webapp/node_modules/babel-core/lib/transformation/file/options/option-manager.js:347:14)
    at OptionManager.addConfig (/Users/rodrigo/work/src/gitlab.com/rodzzlessa24/hairbuddy/webapp/node_modules/babel-core/lib/transformation/file/options/option-manager.js:248:10)
    at OptionManager.findConfigs (/Users/rodrigo/work/src/gitlab.com/rodzzlessa24/hairbuddy/webapp/node_modules/babel-core/lib/transformation/file/options/option-manager.js:454:16)
    at OptionManager.init (/Users/rodrigo/work/src/gitlab.com/rodzzlessa24/hairbuddy/webapp/node_modules/babel-core/lib/transformation/file/options/option-manager.js:502:12)
    at File.initOptions (/Users/rodrigo/work/src/gitlab.com/rodzzlessa24/hairbuddy/webapp/node_modules/babel-core/lib/transformation/file/index.js:243:89)
    at new File (/Users/rodrigo/work/src/gitlab.com/rodzzlessa24/hairbuddy/webapp/node_modules/babel-core/lib/transformation/file/index.js:159:72)
    at Pipeline.transform (/Users/rodrigo/work/src/gitlab.com/rodzzlessa24/hairbuddy/webapp/node_modules/babel-core/lib/transformation/pipeline.js:49:16)
    at transpile (/Users/rodrigo/work/src/gitlab.com/rodzzlessa24/hairbuddy/webapp/node_modules/babel-loader/index.js:14:22)
    at Object.module.exports (/Users/rodrigo/work/src/gitlab.com/rodzzlessa24/hairbuddy/webapp/node_modules/babel-loader/index.js:88:12)
 @ ./~/vue-select/src/components/Select.vue 3:17-113](url)

And here is my webpack config file

module.exports =  {
  entry: [
    './src/main.js'
  ],
  output: {
    path: "dist/js",
    publicPath: "dist/",
    filename: "app.js"
  },
  watch: true,
  module: {
    loaders: [
      {
        test: /\.js$/,
        // excluding some local linked packages.
        // for normal use cases only node_modules is needed.
        exclude: /node_modules|vue\/src|vue-router\//,
        loader: 'babel'
      },
      {
        test: /\.scss$/,
        loaders: ['style', 'css', 'sass']
      },
      {
        test: /\.vue$/,
        loader: 'vue'
      }
    ]
  },
  babel: {
    presets: ['es2015'],
    plugins: ['transform-runtime']
  },
  resolve: {
    modulesDirectories: ['node_modules']
  }
}
support

Most helpful comment

Seems like a build/babel error, it can't track down the babel stage-2 package.

Try npm install --save-dev babel-preset-stage-2 and run your build again.

All 3 comments

Seems like a build/babel error, it can't track down the babel stage-2 package.

Try npm install --save-dev babel-preset-stage-2 and run your build again.

Thanks!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

theseawolves picture theseawolves  路  4Comments

manjunath-coachthem picture manjunath-coachthem  路  3Comments

rafalolszewski94 picture rafalolszewski94  路  3Comments

edalzell picture edalzell  路  3Comments

FrozenIce0617 picture FrozenIce0617  路  3Comments