Versions 0.12.4+ throw TypeError: Cannot read property 'schema' of undefined
Hi Can't work out quite what's going on but after upgrading from 11.3 -> 12.5 I get this:
Type Error ---------------------------------------------
TypeError: Cannot read property 'schema' of undefined
at new ServerlessPlugin (/home/nick/workspace/HASKELL/sloganator.hs/node_modules/serverless-haskell/dist/index.js:115:35)
at PluginManager.addPlugin (/home/nick/workspace/HASKELL/sloganator.hs/node_modules/serverless/lib/classes/PluginManager.js:78:28)
at /home/nick/workspace/HASKELL/sloganator.hs/node_modules/serverless/lib/classes/PluginManager.js:115:31
at Array.forEach (<anonymous>)
at PluginManager.loadAllPlugins (/home/nick/workspace/HASKELL/sloganator.hs/node_modules/serverless/lib/classes/PluginManager.js:115:8)
at /home/nick/workspace/HASKELL/sloganator.hs/node_modules/serverless/lib/Serverless.js:96:35
...etc..
with
Your Environment Information ---------------------------
Operating System: linux
Node Version: 15.2.1
Framework Version: 1.67.3
Plugin Version: 3.8.4
SDK Version: 2.3.2
Components Version: 2.34.9
After downgrading it seems to stop (this, at least) in 0.12.3 so maybe the schema validation did something? I've checked the docs.
A bit of digging - this seems to be the line (from #153), https://github.com/seek-oss/serverless-haskell/pull/153/files#diff-dcdc3e0b3362edb8fec2a51d3fa51f8fb8af8f70247e06d9887fa934834c9122R159 but not sure what it's all doing really
Which version of serverless package are you using?
Ah yes, I tried a bunch of different ones. Looks like I'm now on a working combo of 1.67.3 and plugin 0.12.3
Previously i had tried upgrading to latest (1.83.2) which I think was the one failing for me as above.
Did NPM or Yarn warn you in any way? 0.12.4 bumped the serverless dependency to 2.4.0 (or above). Now that I think of it, it should have mentioned that in a changelog...
I don't think it did, but again tried many iterations before realising maybe this wasn't me. I could try to recreate it if that helps?
And yes +1 for mentioning in changelog, I had a look (or a bigger version bump? semver's a bit weird for plugins sometimes IMO)