1

I've been tasked with refactoring the React UI in a project that has two nodejs projects in it (both with React). Currently both nodejs projects have the same UI components. My question is, is there a way to move the common components to a shared folder outside of the nodejs project folder?

|-- Main Project

|-- Nodejs Project1

|-- Nodejs Project2

|-- Common Folder <--- Move Common Components Here

I've tried referencing the files through relative and direct paths, but node seems to freak out whenever I try to access anything outside of it project folder.

Heath
  • 1,021
  • 3
  • 12
  • 19
  • 2
    https://stackoverflow.com/questions/21461465/sharing-code-between-node-applications – Nico Sep 17 '19 at 15:48
  • It's just a matter of using the correct relative paths. Files are just files to node.js so you just need a correct path to the file. We can't really help any more specifically than that because you've offered no specific details. – jfriend00 Sep 17 '19 at 15:53

0 Answers0