Estaba practicando un entorno de producción de una aplicación que estoy haciendo en Laravel y al usar el comando npm run prod me da este error en la terminal:
ERROR Failed to compile with 2 errors 11:01:53
error in ./resources/sass/app.scss
Syntax Error: ModuleBuildError: 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 |
error in ./resources/sass/app.scss
Syntax Error: 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
2 assets
ERROR in ./resources/sass/app.scss Module build failed (from ./node_modules/css-loader/index.js): ModuleBuildError: 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 |
at C:\laragon\www\laravel\node_modules\webpack\lib\NormalModule.js:316:20
at C:\laragon\www\laravel\node_modules\loader-runner\lib\LoaderRunner.js:367:11
at C:\laragon\www\laravel\node_modules\loader-runner\lib\LoaderRunner.js:233:18
at context.callback (C:\laragon\www\laravel\node_modules\loader-runner\lib\LoaderRunner.js:111:13)
at C:\laragon\www\laravel\node_modules\postcss-loader\src\index.js:207:9
@ ./resources/sass/app.scss
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! C:\Users\Asus\AppData\Roaming\npm-cache_logs\2020-02-12T16_01_53_656Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 2
npm ERR! @ prod: npm run production
npm ERR! Exit status 2
npm ERR!
npm ERR! Failed at the @ prod 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! C:\Users\Asus\AppData\Roaming\npm-cache_logs\2020-02-12T16_01_53_792Z-debug.log
Estoy usando Laravel 6.0, npm 6.9.0 y node 12.5.0
php artisan "algo"
paralaravel
ya quenpm
que yo sepa es paranodejs
y no creo que se puedan combinar ya que ambos son del lado del servidor. Si quieres combinar javascript y php creo que deberias usarangular
,react
ovue
parafrontend
y php parabackend
pero en ese caso php solo serian webservice. Tu pregunata es similar a esta.resources/sass/app.scss
, aparentemente tienes un bloque sin cerrar.app.scss
¿podrías editar tu pregunta y colocar ambas cosas?