My FeedDiscussionsHeadless CMS
New
Sign in
Log inSign up
Learn more about Hashnode Headless CMSHashnode Headless CMS
Collaborate seamlessly with Hashnode Headless CMS for Enterprise.
Upgrade ✨Learn more

Production compile NPM on Laravel fails in Bootstrap

Emil Moe's photo
Emil Moe
·Jan 7, 2020

Can anyone explain to me what is going wrong here and how to fix it? The problem only occurs when I compile for production npm run prod never when I compile for development npm run dev, so it must be something to do with the minifications.

Screenshot 2020-01-07 at 08.35.08.png


As code:

ERROR in ./resources/sass/app.scss (./node_modules/css-loader??ref--5-2!./node_modules/postcss-loader/src??postcss0!./node_modules/resolve-url-loader??ref--5-4!./node_modules/sass-loader/dist/cjs.js??ref--5-5!./resources/sass/app.scss)
Module build failed (from ./node_modules/postcss-loader/src/index.js):
SyntaxError

(259:4) Unclosed block

  257 | 
  258 |   .navbar-toggler-icon {
> 259 |     background-image: escape-svg($navbar-light-toggler-icon-bg);
      |    ^
  260 |   }
  261 | 

 @ ./resources/sass/app.scss 2:14-253
npm ERR! code ELIFECYCLE
npm ERR! errno 2
npm ERR! @ production: `cross-env NODE_ENV=production node_modules/webpack/bin/webpack.js --no-progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js`
npm ERR! Exit status 2
npm ERR! 
npm ERR! Failed at the @ production script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/emil/.npm/_logs/2020-01-06T22_26_52_993Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 2
npm ERR! @ prod: `npm run production`
npm ERR! Exit status 2
npm ERR!