create-static-site
create-static-site copied to clipboard
[Jekyll] Error: spawn bundle ENOENT
Generated a fresh jekyll project using npx create-static-site normative-landing-page --template jekyll I got an error when running yarn start. See error below:
> yarn start
yarn run v1.3.2
$ static-scripts start
[20:45:21] Using gulpfile ~\repos\opensource\normative-landing-page\node_modules\static-scripts\config\gulp.config.js
[20:45:21] Starting 'clean'...
[20:45:21] Finished 'clean' after 15 ms
[20:45:21] Starting 'build'...
[20:45:21] Starting 'styles'...
[20:45:21] Starting 'styles:production'...
[20:45:21] Starting 'scripts'...
[20:45:21] Starting 'scripts:production'...
[20:45:22] Starting 'images'...
[20:45:22] Starting 'svg'...
[20:45:22] gulp-imagemin: Minified 0 images
[20:45:22] Finished 'images' after 570 ms
[20:45:25] Finished 'svg' after 3.33 s
[20:45:26] Finished 'styles:production' after 5.08 s
[20:45:26] Starting 'styles:development'...
[20:45:26] Version: webpack 3.11.0
Asset Size Chunks Chunk Names
scripts.js 798 bytes 0 [emitted] scripts
scripts.js.map 1.44 kB 0 [emitted] scripts
[20:45:27] Finished 'scripts:production' after 5.27 s
[20:45:27] Starting 'scripts:development'...
[20:45:27] Finished 'styles:development' after 358 ms
[20:45:27] Finished 'styles' after 5.45 s
[20:45:27] Version: webpack 3.11.0
Asset Size Chunks Chunk Names
scripts.js 2.7 kB 0 [emitted] scripts
[20:45:27] Finished 'scripts:development' after 188 ms
[20:45:27] Finished 'scripts' after 5.48 s
[20:45:27] Starting 'generator'...
JEKYLL_ENV
[20:45:27] [Jekyll] Error: spawn bundle ENOENT
[20:45:27] 'generator' errored after 7.86 ms
[20:45:27] Error: Build failed
at formatError (C:\Users\adamw\repos\opensource\normative-landing-page\node_modules\gulp\bin\gulp.js:169:10)
at Gulp.<anonymous> (C:\Users\adamw\repos\opensource\normative-landing-page\node_modules\gulp\bin\gulp.js:195:15)
at emitOne (events.js:101:20)
at Gulp.emit (events.js:188:7)
at Gulp.Orchestrator._emitTaskDone (C:\Users\adamw\repos\opensource\normative-landing-page\node_modules\orchestrator\index.js:264:8)
at C:\Users\adamw\repos\opensource\normative-landing-page\node_modules\orchestrator\index.js:275:23
at finish (C:\Users\adamw\repos\opensource\normative-landing-page\node_modules\orchestrator\lib\runTask.js:21:8)
at cb (C:\Users\adamw\repos\opensource\normative-landing-page\node_modules\orchestrator\lib\runTask.js:29:3)
at ChildProcess.generator.on.err (C:\Users\adamw\repos\opensource\normative-landing-page\node_modules\static-scripts\config\gulp.config.js:285:5)
at emitOne (events.js:96:13)
[20:45:27] 'build' errored after 5.62 s
[20:45:27] Error in plugin "run-sequence(generator)"
Error
at finish (C:\Users\adamw\repos\opensource\normative-landing-page\node_modules\run-sequence\index.js:82:12)
at Gulp.onError (C:\Users\adamw\repos\opensource\normative-landing-page\node_modules\run-sequence\index.js:93:3)
at emitOne (events.js:101:20)
at Gulp.emit (events.js:188:7)
at Gulp.Orchestrator._emitTaskDone (C:\Users\adamw\repos\opensource\normative-landing-page\node_modules\orchestrator\index.js:264:8)
at C:\Users\adamw\repos\opensource\normative-landing-page\node_modules\orchestrator\index.js:275:23
at finish (C:\Users\adamw\repos\opensource\normative-landing-page\node_modules\orchestrator\lib\runTask.js:21:8)
at cb (C:\Users\adamw\repos\opensource\normative-landing-page\node_modules\orchestrator\lib\runTask.js:29:3)
at ChildProcess.generator.on.err (C:\Users\adamw\repos\opensource\normative-landing-page\node_modules\static-scripts\config\gulp.config.js:285:5)
at emitOne (events.js:96:13)
[20:45:27] 'generator' errored after 18 ms
[20:45:27] Error: task completion callback called too many times
at finish (C:\Users\adamw\repos\opensource\normative-landing-page\node_modules\orchestrator\lib\runTask.js:15:10)
at cb (C:\Users\adamw\repos\opensource\normative-landing-page\node_modules\orchestrator\lib\runTask.js:29:3)
at ChildProcess.generator.on.code (C:\Users\adamw\repos\opensource\normative-landing-page\node_modules\static-scripts\config\gulp.config.js:290:5)
at emitTwo (events.js:106:13)
at ChildProcess.emit (events.js:191:7)
at maybeClose (internal/child_process.js:877:16)
at Socket.<anonymous> (internal/child_process.js:334:11)
at emitOne (events.js:96:13)
at Socket.emit (events.js:188:7)
at Pipe._handle.close [as _onclose] (net.js:498:12)
Done in 10.73s.
Environment OS: Windows 10 Node: 6.9.2 & 8.91 Create-static-site: 0.1.2
Also tried manually installing the gems with bundle install and prefixing yarn start with bundle exec, i.e. bundle exec yarn start. Neither changed what error was provided.
Speculate that it's Windows-specific and might get inadvertently fixed by https://github.com/forestryio/create-static-site/pull/37 by ditching gulp.
If you are still facing this, I have fixed it using win-spawn
Install win-spawn and update your spawn variable on gulp.config.js
var spawn = process.platform === 'win32' ? require('win-spawn') : require('child_process').spawn;