Rrule: RRule undefined

Created on 29 Aug 2015  ·  7Comments  ·  Source: jakubroztocil/rrule

Inside NPM webpack

var RRule = require('rrule').RRule;
// RRule is undefined

// This works
var RRule = require('rrule');
// or
import RRule from "rrule";

Most helpful comment

In nlp.js I changed

if (serverSide) {
    RRule = require('./rrule').RRule;

to

if (serverSide) {
    RRule = require('./rrule');

but I don't think that's the whole story; in my webpacked project I have to do var RRule = require("rrule") instead of var RRule = require("rrule").RRule

All 7 comments

I have the same problem. Looks like there was an update a day or so ago but it's still broken :cry:

How to fix that?

In nlp.js I changed

if (serverSide) {
    RRule = require('./rrule').RRule;

to

if (serverSide) {
    RRule = require('./rrule');

but I don't think that's the whole story; in my webpacked project I have to do var RRule = require("rrule") instead of var RRule = require("rrule").RRule

Anyone got this to work? I can get RRule to work, but I can't use toText() for the life of me :/

I'm having the same issue using webpack. I can't get nlp.js to work.

Ok, everything worked fine by using latest master.

I think this issue is dead. Please update if more support is needed!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Prinzhorn picture Prinzhorn  ·  15Comments

spurreiter picture spurreiter  ·  3Comments

maconfr picture maconfr  ·  6Comments

michaelkrog picture michaelkrog  ·  9Comments

kirrg001 picture kirrg001  ·  5Comments