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

105
Views
Local dependency in CRACO

I was using a modified @naisutech/react-tree package in my project. It was added to package.json like this: "dependencies": {"@naisutech/react-tree": "file:Dependencies/Tree"}. Now as I switched to CRACO to use Module Federation, craco start gives me an error:

looking for modules in C:\Users\T\Documents\my-host-project\src
        C:\Users\T\Documents\my-host-project\src\file:Dependencies doesn't exist 

The error might originate in modulefederation.config.js, I am not 100% sure:

const deps = require("./package.json").dependencies;

module.exports = {
  name: "virtual_host",
  remotes: {
    mf_cmps: "mf_cmps@http://localhost:3001/remoteEntry.js",
  },
  filename: "remoteEntry.js",
  shared: {
    ...deps,
    react: {
      singleton: true,
      requiredVersion: deps["react"],
    },
    "react-dom": {
      singleton: true,
      requiredVersion: deps["react-dom"],
    },
    "react-router-dom": {
      singleton: true,
      requiredVersion: deps["react-router-dom"],
    }
  },
};

Is there a way to add a local dependency in CRACO config file? Thank you.

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!