Customizing Google Spreadsheet Widget - Error on Gulp Build

  • 1
  • Problem
  • Updated 3 years ago
  • Solved
I'm having problems getting the google spreadsheet widget to build on my web server.

I installed Git, Node.js, npm, Bower, and Gulp. There were some errors/warnings but I think I got them resolved.

The message I get when doing a gulp build on this is:

[@web01 widget-google-spreadsheet]$ gulp build
[14:48:45] Warning: gulp version mismatch:
[14:48:45] Global gulp is 3.9.1
[14:48:45] Local gulp is 3.8.11
[14:48:50] Using gulpfile /var/www/digitalsign/widgets/widget-google-spreadsheet/gulpfile.js
[14:48:50] Starting 'build'...
[14:48:50] Starting 'clean'...
[14:48:50] Starting 'config'...
[14:48:50] Environment is prod
[14:48:50] Finished 'config' after 108 ms
[14:48:50] Finished 'clean' after 120 ms
[14:48:50] Starting 'lint'...
[14:48:50] Starting 'fonts'...
[14:48:50] Starting 'images'...
[14:48:50] Starting 'i18n'...

/var/www/digitalsign/widgets/widget-google-spreadsheet/src/config/config.js
  line 4  col 7  'CONFIG' was used before it was defined.

✖ 1 problem

[14:48:51] 'lint' errored after 806 ms
[14:48:51] Error in plugin 'gulp-jshint'
JSHint failed for: config/config.js
[14:48:51] 'build' errored after 929 ms
[14:48:51] Error: [object Object]
    at formatError (/usr/local/lib/node_modules/gulp/bin/gulp.js:169:10)
    at Gulp.<anonymous> (/usr/local/lib/node_modules/gulp/bin/gulp.js:195:15)
    at Gulp.EventEmitter.emit (events.js:117:20)
    at Gulp.Orchestrator._emitTaskDone (/var/www/digitalsign/widgets/widget-google-spreadsheet/node_modules/gulp/node_modules/orchestrator/index.js:264:8)
    at /var/www/digitalsign/widgets/widget-google-spreadsheet/node_modules/gulp/node_modules/orchestrator/index.js:275:23
    at finish (/var/www/digitalsign/widgets/widget-google-spreadsheet/node_modules/gulp/node_modules/orchestrator/lib/runTask.js:21:8)
    at cb (/var/www/digitalsign/widgets/widget-google-spreadsheet/node_modules/gulp/node_modules/orchestrator/lib/runTask.js:29:3)
    at finish (/var/www/digitalsign/widgets/widget-google-spreadsheet/node_modules/run-sequence/index.js:38:5)
    at Gulp.onError (/var/www/digitalsign/widgets/widget-google-spreadsheet/node_modules/run-sequence/index.js:45:4)
    at Gulp.EventEmitter.emit (events.js:117:20)

/var/www/digitalsign/widgets/widget-google-spreadsheet/src/config/dev.js
  line 4  col 7  'CONFIG' was used before it was defined.

✖ 1 problem

[14:48:51] Finished 'images' after 770 ms

/var/www/digitalsign/widgets/widget-google-spreadsheet/src/config/prod.js
  line 4  col 7  'CONFIG' was used before it was defined.

✖ 1 problem


/var/www/digitalsign/widgets/widget-google-spreadsheet/src/config/test.js
  line 4  col 7  'CONFIG' was used before it was defined.

✖ 1 problem


/var/www/digitalsign/widgets/widget-google-spreadsheet/src/widget/content.js
  line 513  col 12  '_updateTable' was used before it was defined.
  line 534  col 12  '_updateCustomTable' was used before it was defined.

✖ 2 problems

[14:48:51] Finished 'fonts' after 1.27 s
[14:48:51] Finished 'i18n' after 1.26 s
[@web01 widget-google-spreadsheet]$


Does anyone know how what I'm doing wrong?
Photo of Andrea Adamchak

Andrea Adamchak

  • 112 Points 100 badge 2x thumb

Posted 3 years ago

  • 1
Photo of Blake Freeman

Blake Freeman, Official Rep

  • 36,116 Points 20k badge 2x thumb
Hi Andrea,

I'll get this over to our developers.
Photo of Andrea Adamchak

Andrea Adamchak

  • 112 Points 100 badge 2x thumb
I tried to add more information here and wasn't able to. I'll put it into this comment:

I followed these steps:
git clone https://github.com/Rise-Vision/widget-google-spreadsheet.git
cd widget-google-spreadsheet
npm install
bower install
gulp build

When I do the gulp build on the unedited git clone files, I get the error I pasted above.

I've tried this four times. One of those times was on a second web server (both running CentOS). I get the same error each time
Photo of Steve Gregory

Steve Gregory, Champion

  • 1,186 Points 1k badge 2x thumb
I saw this error too on gulp build.  I'm pretty sure that jshint is being too strict here, and I'm pretty sure it is safe to set it to be permissive with the "used before defined" error.  You can fix this in the jshint setttings - open ./widget-google-spreadsheet/.jshintrc and find the line for the "latedef" option.  Change it to false, i.e.:

    "latedef"      : false,

Save .jshintrc and run gulp build again.  

That's how I got gulp build to work on this widget.
Photo of Blake Freeman

Blake Freeman, Official Rep

  • 36,116 Points 20k badge 2x thumb
Thanks Steve!

Hey Andrea, could you try that out?
Photo of Andrea Adamchak

Andrea Adamchak

  • 112 Points 100 badge 2x thumb
That fixed the build errors. Thank you! Thank you!