Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

154
Views
Redux-orm error, './../../../lodash/filter.js' does not provide an export named 'default'

I am pretty new to javascript and redux. My application's state got quite complex, while Redux by itself helps a lot, it lacks the capabilities for specifying which relationships there are within your data.

I am trying to update nested data with redux reducers/actions in javascript. i've tried using Redux-orm library but i get this error from console.

Uncaught SyntaxError: The requested module './../../../lodash/filter.js' does not provide an export named 'default'

I checked if the imports/exports are the source for this error, but i think its something else. Does someone know how to fix this?

My code:

import { Model, fk, attr, ORM } from 'redux-orm'



export class Cursus extends Model {
    static get fields() {
        return {
        id: attr(),
        cursus: attr(),
        code: attr(),
        naam: attr(),
        ec: attr(),
    
        }
      }
    static reducer(action, Cursus, session) {
      
        switch (action.type) {
          case 'CREATE_CURSUS': {
            Cursus.create(action.payload)
            break
          }
        }
        return undefined;
      }
      
    }
Cursus.modelName = 'Cursus';




export class Toets extends Model {
    static get fields() {
      return {
        id: attr(),
        toets: attr(),
        toetsvorm: attr(),
        weging: attr(),
        ectoets: attr(),
        periode:attr(),
        programmaleider:attr(),
                // foreign key field
                cursusId: fk({
                  to: 'Cursus',
                  as: 'cursus',
                  relatedName: 'toetsen',
              }),
        
      }
    }
  
    static reducer(action, Toets, session) {
      switch (action.type) {
        case 'ADD_TOETS': {
          Toets.create(action.payload)
          break
        }
      }
      return undefined;
    }
  }
  Toets.modelName = 'Toets'

  export const orm = new ORM()
  orm.register(Cursus, Toets)
import { createStore, combineReducers } from 'redux'
import { createReducer } from 'redux-orm'
import { orm } from '../model/Model.js'


const rootReducer = combineReducers({
  // Insert the auto-generated Redux-ORM reducer.  This will
  // initialize our model "tables", and hook up the reducer
  // logic we defined on each Model subclass
  entities: createReducer(orm)
})



export const store = createStore(
  rootReducer,
  window.__REDUX_DEVTOOLS_EXTENSION__ && window.__REDUX_DEVTOOLS_EXTENSION__()
);
about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!