Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Versions 0.12.4+ throw TypeError: Cannot read property 'schema' of undefined #164

Open
declension opened this issue Mar 20, 2021 · 5 comments

Comments

@declension
Copy link

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.

@declension
Copy link
Author

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

@koterpillar
Copy link
Contributor

Which version of serverless package are you using?

@declension
Copy link
Author

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.

@koterpillar
Copy link
Contributor

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...

@declension
Copy link
Author

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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants