Laravel Elixir Gulp 版本错误

Laravel Elixir Gulp Version Error

之前还好,我的电脑在做gulp的时候蓝屏了,现在是gulp版本。我已尝试删除 node_modules 并执行 npm install 但错误仍然存​​在,谢谢。

D:\laravel>gulp
[09:30:55] Using gulpfile D:\laravel\gulpfile.js
[09:30:55] Starting 'all'...
[09:30:55] Starting 'styles'...
[09:30:55] Finished 'styles' after 323 ms
[09:30:55] Starting 'scripts'...
[09:30:55] Finished 'scripts' after 65 ms
[09:30:55] Starting 'version'...
[09:30:55] 'version' errored after 920 μs
[09:30:55] SyntaxError: Unexpected token   in JSON at position 0
at Object.parse (native)
at VersionTask.deleteManifestFiles (D:\laravel\node_modules\laravel-elixir\dist\tasks\VersionTask.js:113:29)
at VersionTask.gulpTask (D:\laravel\node_modules\laravel-elixir\dist\tasks\VersionTask.js:71:18)
at VersionTask.run (D:\laravel\node_modules\laravel-elixir\dist\tasks\Task.js:138:31)
at Gulp.<anonymous> (D:\laravel\node_modules\laravel-elixir\dist\tasks\GulpBuilder.js:65:67)
at module.exports (D:\laravel\node_modules\orchestrator\lib\runTask.js:34:7)
at Gulp.Orchestrator._runTask (D:\laravel\node_modules\orchestrator\index.js:273:3)
at Gulp.Orchestrator._runStep (D:\laravel\node_modules\orchestrator\index.js:214:10)
at Gulp.Orchestrator.start (D:\laravel\node_modules\orchestrator\index.js:134:8)
at runNextSet (D:\laravel\node_modules\run-sequence\index.js:86:16)
[09:30:55] 'all' errored after 395 ms
[09:30:55] SyntaxError in plugin 'run-sequence(version)'
Message:
Unexpected token   in JSON at position 0
Stack:
SyntaxError: Unexpected token   in JSON at position 0
at Object.parse (native)
at VersionTask.deleteManifestFiles (D:\laravel\node_modules\laravel-elixir\dist\tasks\VersionTask.js:113:29)
at VersionTask.gulpTask (D:\laravel\node_modules\laravel-elixir\dist\tasks\VersionTask.js:71:18)
at VersionTask.run (D:\laravel\node_modules\laravel-elixir\dist\tasks\Task.js:138:31)
at Gulp.<anonymous> (D:\laravel\node_modules\laravel-elixir\dist\tasks\GulpBuilder.js:65:67)
at module.exports (D:\laravel\node_modules\orchestrator\lib\runTask.js:34:7)
at Gulp.Orchestrator._runTask (D:\laravel\node_modules\orchestrator\index.js:273:3)
at Gulp.Orchestrator._runStep (D:\laravel\node_modules\orchestrator\index.js:214:10)
at Gulp.Orchestrator.start (D:\laravel\node_modules\orchestrator\index.js:134:8)
at runNextSet (D:\laravel\node_modules\run-sequence\index.js:86:16)

要解决此问题,只需删除您的 public/build 文件夹,然后再次 运行 gulp。我多次遇到这个问题,每次我的问题都通过删除构建文件夹来解决。

希望这会有所帮助。