I am trying to setup a standalone dev environment without using laravel. I get error when i run this command : npm run watch
The line causes the problem is server: {baseDir: 'dev'}
Notification window says Build Successful but terminal throws error.
mix.js('src/js/main.js', 'dev/js')
.stylus('src/stylus/main.styl', 'dev/css')
.browserSync({
port:'3000'
});
mix.js('src/js/main.js', 'dev/js')
.stylus('src/stylus/main.styl', 'dev/css')
.browserSync({
port:'3000',
server: {baseDir: 'dev'} // this is the only difference
});
Invalid config. You cannot specify both server & proxy options. **I don't do that**
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] watch: `NODE_ENV=development webpack --watch --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] watch script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
You cannot specify both server & proxy options
Pass in the property proxy a value false
.browserSync({
proxy: false,
port:'3000',
server: {baseDir: 'dev'} // this is the only difference
});
@webmarkelov I don't specify both server & proxy. I understand it is not me passing the proxy. The mix defaults. Thank you for pointing out.
Most helpful comment
You cannot specify both server & proxy optionsPass in the property proxy a value false