Reputation: 205
Anytime I try to run encore, it doesn't complete and hangs at...
$ /vagrant/app/node_modules/.bin/encore dev
Running webpack ...
I've removed node_modules
and re-installed numerous times following the Symfony documentation. Tried using only npm
and also tried only using yarn
. Any suggestions would be much appreciated. I've included package.json
and webpack.config.js
, if there is anything else needed to help troubleshoot, please let me know.
package.json
{
"devDependencies": {
"@symfony/webpack-encore": "^0.20.1",
"node-sass": "^4.9.0",
"sass-loader": "^7.0.3"
}
}
webpack.config.js
var Encore = require('@symfony/webpack-encore');
Encore
// the project directory where compiled assets will be stored
.setOutputPath('public/build/')
// the public path used by the web server to access the previous directory
.setPublicPath('/app/build')
.setManifestKeyPrefix('build')
.cleanupOutputBeforeBuild()
.enableSourceMaps(!Encore.isProduction())
// uncomment if you use Sass/SCSS files
.enableSassLoader()
// uncomment to create hashed filenames (e.g. app.abc123.css)
// .enableVersioning(Encore.isProduction())
// uncomment to define the assets of the project
// .addEntry('js/app', './assets/js/app.js')
.addStyleEntry('css/style', './assets/sass/style.scss')
// .addStyleEntry('css/print', './assets/sass/print.scss')
// uncomment for legacy applications that require $/jQuery as a global variable
// .autoProvidejQuery()
;
module.exports = Encore.getWebpackConfig();
Upvotes: 1
Views: 796
Reputation: 205
I figured out the issue. I had to disable the resolveUrlLoader
in my sass loader options.
.enableSassLoader(function(options) {}, {
resolveUrlLoader: false
})
Upvotes: 1