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.

Fails to import in Meteor using Coffeescript? (may be unrelated to simple-schema)

See original GitHub issue

I am trying to migrate from the deprecated meteor-simple-schema package to node-simple-schema.

However, in my Meteor 1.5 app I’m facing a very strange issue where SimpleSchema = require 'simpl-schema' doesn’t work (“SimpleSchema is undefined”) using Coffeescript, while import SimpleSchema from 'simpl-schema'; works fine in a JS file.

This is my Coffeescript code (simplified for testing):

SimpleSchema = require 'simpl-schema'

SimpleSchema.setDefaultMessages
  messages:
    en: 
      "too_long": "Too long!"

This throws an SimpleSchema is undefined error. At first, I was sure I was doing something wrong, but when I tested the following code in plain JS, the undefined error was gone:

import SimpleSchema from 'simpl-schema';

SimpleSchema.setDefaultMessages({
  messages: {
    en: {
      "too_long": "Too long!",
    },
  },
});

Could this be a SimpleSchema issue? Has anyone successfully imported node-simpl-schema in Meteor using Coffeescript? Thanks!

EDIT: I can hardly imagine this issue is simple-schema related. However, I am importing other NPM packages in my app without any problems and did quite a bit of testing to find the culprit. Still, posting this here feels kinda lame. Sorry for polluting your repo’s issues list and feel free to discard this completely.

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
thomasspiessercommented, Jun 13, 2017

First result when googling your error: could that solve your problem? https://forums.meteor.com/t/solved-meteor-upgrade-to-1-5-error-uncaught-referenceerror-buffer-is-not-defined/36903

since this is totally unrelated to the issue you posted, which is resolved and has nothing to do with simpleschema in the first place, consider closing the issue pls.

0reactions
thomasspiessercommented, Jun 14, 2017

Sure thing @persac glad you got it working.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Fails to import in Meteor using Coffeescript? (may be unrelated ...
I am trying to migrate from the deprecated meteor-simple-schema package to node-simple-schema. However, in my Meteor 1.5 app I'm facing a very strange...
Read more >
SimpleSchema is not a constructor in Meteor 1.6 project ...
I've gone through the SimpleSchema documentation and this constructor is there, my code is same as their example. Not sure why this error...
Read more >
Coffeescript not defined on the client - help
Hi, I'm using CoffeeScript on some server-files; no problem… (it is installed with the Meteor Package). But if I try to compile a...
Read more >
Meteor Blog - Medium - RSSing.com
We say the live bindings are immutable because the importing module is forbidden from assigning anything to them directly. In other words, the...
Read more >
e0041cbb2e0f904a0131fb6406c...
#7636 Add classes to notification menu so they can be hidden in css ... #8390 Slack import failing and not being able to...
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