代码之家  ›  专栏  ›  技术社区  ›  ostrichegret

Laravel Elixir吞咽版本错误

  •  1
  • ostrichegret  · 技术社区  · 8 年前

    以前很好,在我的电脑在大口喝的时候出现了BSOD,现在是大口喝版本。我已经尝试删除node_modules并进行npm安装,但错误仍然存在,谢谢。

    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)
    
    1 回复  |  直到 8 年前
        1
  •  12
  •   Altaf Hussain    7 年前

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

    希望这会有所帮助。