DEV Community

Discussion on: Somewhat decent workflow for custom functions in Google apps script

Collapse
 
bugmagnet profile image
Bruce Axtens

I'm even newer at this stuff than you, so bear with me.

I've cloned your repository and have installed gulp globally.

>gulp build
[10:29:25] Local modules not found in ~\Source\Repos\GAS_insertValues
[10:29:25] Try running: npm install

>npm install
npm WARN lab@1.0.0 No description
npm WARN lab@1.0.0 No repository field.

added 485 packages from 783 contributors and audited 4397 packages in 19.359s
found 10 vulnerabilities (1 low, 5 moderate, 4 high)
  run `npm audit fix` to fix them, or `npm audit` for details

So I'm going to not do the audit till I've tried the build again

>gulp build
fs.js:25
'use strict';
^

ReferenceError: internalBinding is not defined
    at fs.js:25:1
    at req_ (C:\Users\bugma\Source\Repos\GAS_insertValues\node_modules\natives\index.js:137:5)
    at Object.req [as require] (C:\Users\bugma\Source\Repos\GAS_insertValues\node_modules\natives\index.js:54:10)
    at Object.<anonymous> (C:\Users\bugma\Source\Repos\GAS_insertValues\node_modules\vinyl-fs\node_modules\graceful-fs\fs.js:1:99)
    at Module._compile (internal/modules/cjs/loader.js:722:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:733:10)
    at Module.load (internal/modules/cjs/loader.js:620:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:560:12)
    at Function.Module._load (internal/modules/cjs/loader.js:552:3)
    at Module.require (internal/modules/cjs/loader.js:658:17)

Ok, so maybe the audit is necessary ...

>npm audit fix
npm WARN lab@1.0.0 No description
npm WARN lab@1.0.0 No repository field.

+ eslint@5.16.0
added 18 packages from 11 contributors, removed 31 packages and updated 33 packages in 10.721s
fixed 4 of 10 vulnerabilities in 4397 scanned packages
  1 package update for 6 vulns involved breaking changes
  (use `npm audit fix --force` to install breaking changes; or refer to `npm audit` for steps to fix these manually)

Breaking changes? That doesn't sound good. Any idea where to from here?

Collapse
 
mwallin profile image
Mikael Wallin

Oh, that looks like no fun at all! But just looking at it I'm not sure what's causing it. Other then the usual, "code breaks with time"...

I'll give it a look when I get off work tonight and make updates to the repo and the post where necessary.

I think I should be able to fix it and give you a better starting point! Hope that works for you! =)

Collapse
 
mwallin profile image
Mikael Wallin • Edited

Sorry that it took a few days extra, life is unpredictable sometimes...

I upgraded all the dependencies and sure enough, Gulp is version 4 now and that broke everything. The fix was really easy, however, just declare the tasks before trying to run them. I changed this and updated the repo.

There is also a new version of Clasp since last time, but the only issue I had there was easy to fix by logging out and in again.

Just let me know if anything else seems broken!