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']
}
}
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!
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-2and run your build again.