question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

TypeError: SimpleSchema is not a constructor

See original GitHub issue

Can’t create a schema for some reason.

Here’s my code on a clean Meteor 1.7 install.

import { Mongo } from 'meteor/mongo';
import SimpleSchema from 'simpl-schema';

const schema = new SimpleSchema({
  name: String,
  registered: Boolean,
});

I get the error :

TypeError: SimpleSchema is not a constructor

Any ideas?

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:5

github_iconTop GitHub Comments

5reactions
d3vild06commented, Jul 20, 2018

@dakota11 I just solved by deleting my node_modules directory and doing a fresh npm install. Then fired up my meteor app and that seemed to have worked.

0reactions
lulldevcommented, Apr 5, 2020

Solved:

In my package.json i remove simpl-schema from devDependencies, and add to dependencies

Read more comments on GitHub >

github_iconTop Results From Across the Web

'TypeError: SimpleSchema is not a constructor' · Issue #293
I'm using Meteor 1.7 as well as npm and everytime I startup my meteor app, I get this error log: W20180731-20:01:19.513(-5)?
Read more >
meteor - SimpleSchema is not a constructor
My app constantly crashes with this error. TypeError: SimpleSchema is not a constructor at attendances.js (imports/api/attendances/attendances.
Read more >
TypeError: SimpleSchema is not a constructor in Meteor ...
Coding example for the question TypeError: SimpleSchema is not a constructor in Meteor 1.6 project-Reactjs.
Read more >
Simpleschema Is Not A Constructor
I'm getting another weird error: Uncaught TypeError: Class constructor a cannot While simpleSchema requires using minCount to make an array not empty.
Read more >
TypeError: Schema is not a constructor (Example)
TypeError : Schema is not a constructor. Hi all. I wonder if someone can help me, please. :) Here's my code: ' ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found