[Solved] SimpleSchema.extendOptions is not a function

Hi all,

I’m pretty new to Meteor & am following along to a Meteor lynda course.

I’m using Simpl-schema for my schemas but am getting the following error when I try to run my app:

/Users/dan/.meteor/packages/meteor-tool/.1.7.0_4.h9dep8.vdm4s++os.osx.x86_64+web.browser+web.browser.legacy+web.cordova/mt-os.osx.x86_64/dev_bundle/server-lib/node_modules/fibers/future.js:280
throw(ex);
^

TypeError: SimpleSchema.extendOptions is not a function
at members.js (imports/api/members.js:4:14)
at fileEvaluate (packages/modules-runtime.js:322:7)
at Module.require (packages/modules-runtime.js:224:14)
at require (packages/modules-runtime.js:244:21)
at main.js (server/main.js:1:100)
at fileEvaluate (packages/modules-runtime.js:322:7)
at Module.require (packages/modules-runtime.js:224:14)
at require (packages/modules-runtime.js:244:21)
at /Users/dan/Desktop/hotel/.meteor/local/build/programs/server/app/app.js:164:15
at /Users/dan/Desktop/hotel/.meteor/local/build/programs/server/boot.js:411:36
at Array.forEach ()
at /Users/dan/Desktop/hotel/.meteor/local/build/programs/server/boot.js:220:19
at /Users/dan/Desktop/hotel/.meteor/local/build/programs/server/boot.js:471:5
at Function.run (/Users/dan/Desktop/hotel/.meteor/local/build/programs/server/profile.js:510:12)
at /Users/dan/Desktop/hotel/.meteor/local/build/programs/server/boot.js:470:11
Exited with code: 1
Your application is crashing. Waiting for file change.

I have no idea what the problem is, I am importing Simpl-schema correctly (as in the tutorial) and my packages are installed correctly:

aldeed:collection2-core
"simpl-schema": "^1.5.3"

Could anybody help? Thank you.

Hi @thoracicgerm, Welcome to Meteor!

Can you post the code which causes this error? (imports/api/members.js)
And the your .meteor/versions file?

Then we can help you debug this issue

I’m guessing this is you: https://github.com/aldeed/simple-schema-js/issues/298

My first thought is that the module hasn’t been installed correctly.

Can you try rm -rf node_modules and a fresh meteor npm install?

That usually fixes dumb things like this

Yes that is me. Your fix worked - thank you so much!