Reputation: 1377
I made some changes to my gulpfile.js
. Then I received the following syntax error in my terminal after executing the gulp
command:
'version' errored after 657 μs
SyntaxError: Unexpected token }
at Object.parse (native)
at VersionTask.deleteManifestFiles (/var/www/html/work/node_modules/laravel-elixir/dist/tasks/VersionTask.js:114:29)
at VersionTask.gulpTask (/var/www/html/work/node_modules/laravel-elixir/dist/tasks/VersionTask.js:72:18)
at VersionTask.run (/var/www/html/work/node_modules/laravel-elixir/dist/tasks/Task.js:139:31)
at /var/www/html/work/node_modules/laravel-elixir/dist/tasks/GulpBuilder.js:60:37
at Array.forEach (native)
at Gulp.<anonymous> (/var/www/html/work/node_modules/laravel-elixir/dist/tasks/GulpBuilder.js:59:54)
at module.exports (/var/www/html/work/node_modules/orchestrator/lib/runTask.js:34:7)
at Gulp.Orchestrator._runTask (/var/www/html/work/node_modules/orchestrator/index.js:273:3)
at Gulp.Orchestrator._runStep (/var/www/html/work/node_modules/orchestrator/index.js:214:10)
Looking in my public/build/css directory
I noticed all my css versions are incorrect. How could this happen? How should I fix it?
gulpfile.js
const elixir = require('laravel-elixir');
require('laravel-elixir-vue');
elixir(mix => {
// for the application, after login
mix.sass(['styles.scss','imports.scss'])
.version(['css/styles.css','css/imports.css']);
});
Upvotes: 1
Views: 1769
Reputation: 1377
After opening the rev-manifest.json
file in the public/build/
directory, I discovered it was somehow missing css/imports-xxxxxxx.css
in the json list. I deleted rev-manifest.json
and entered the command gulp
. Now after opening rev-manifest.json
all the css files are listed and the error is gone.
Upvotes: 5