Simple schema and Collection 2 troubles


#1

I ran into several issues with simple schema and collection 2 and solved it myself. This should be a timesaver for people running into a similiar issue.

If I remove aldeed:simple-schema in favour of node module simpl-schema, I get the following error.
I think this happens because of this: https://guide.meteor.com/using-atmosphere-packages.html#peer-npm-dependencies

How I fixed this issue:
1.) I uninstalled aldeed:simple-schema and aldeed:collection2 atmosphere packages
2.) I uninstalled simpl-schema node module
3.) Reinstalled the aldeed:simple-schema and aldeed:collection2 atmosphere packages
4.) Reinstalled simpl-schema node module (because of peer-npm-dependencies)

And make sure you import the node module import SimpleSchema from ‘simpl-schema’ instead of import { SimpleSchema } from ‘meteor/aldeed:simple-schema’;

Any error should be gone now.

see: https://github.com/aldeed/meteor-collection2-core/issues/30

TypeError: func is not a function
W20180213-01:44:54.042(0)? (STDERR)     at /home/paul/Customers/qpona-campaigns/node_modules/simpl-schema/dist/doValidation.js:366:18
W20180213-01:44:54.042(0)? (STDERR)     at Array.forEach (<anonymous>)
W20180213-01:44:54.042(0)? (STDERR)     at doValidation (/home/paul/Customers/qpona-campaigns/node_modules/simpl-schema/dist/doValidation.js:365:17)
W20180213-01:44:54.042(0)? (STDERR)     at ValidationContext.validate (/home/paul/Customers/qpona-campaigns/node_modules/simpl-schema/dist/ValidationContext.js:222:57)
W20180213-01:44:54.042(0)? (STDERR)     at doValidate (packages/aldeed:collection2/collection2.js:433:33)
W20180213-01:44:54.043(0)? (STDERR)     at Mongo.Collection.(anonymous function) [as insert] (packages/aldeed:collection2/collection2.js:195:14)
W20180213-01:44:54.043(0)? (STDERR)     at data.forEach.country (imports/startup/server/fixtures.js:49:39)
W20180213-01:44:54.043(0)? (STDERR)     at Array.forEach (<anonymous>)
W20180213-01:44:54.043(0)? (STDERR)     at Meteor.startup (imports/startup/server/fixtures.js:49:10)
W20180213-01:44:54.043(0)? (STDERR)     at Function.time (/home/paul/Customers/qpona-campaigns/.meteor/local/build/programs/server/profile.js:309:28)