Maputo Maputo - 19 days ago 4x
Javascript Question

Using Redux in Meteor.js

I'm a newbie for Meteor.js and working on a project where I'm also using Redux so I added the kyutaekang:redux package. The problem is that I don't know how to import Redux to use it. I tried:

import { createStore } from 'redux';

but when I start the app I get

[Error: Unable to fetch "redux". Only file URLs of the form file:/// allowed running in Node.]


Meteor does not yet support the ES2015 import out of the box (might be available in 1.3.0). Therefore, you will need a modern module bundler, as also described in the package's Readme file:

This assumes that you’re using npm package manager with a module bundler like Webpack or Browserify to consume CommonJS modules.

You can take a look at this excellent example by Adam Brodzinski to get you started.


After taking a closer look at the package, it does not seem to contain any code.

Nonetheless, my recommendation about Adam's repo (or his other repo, pointed in the comments) still remains as a nice, clean implementation.