1

My file structure would look something like:

./client

 .react

./server

 .express

.express and .react are just shorthand for all of my files in these folders. So I have separate node_modules folders for each of these directories.

3 Answers 3

1

I wouldn't do it with npm itself. It might be handy to create a Makefile in the root, running your required build steps.

This article explains how to create a Makefile.

Sign up to request clarification or add additional context in comments.

Comments

1

This same happen to me when I worked on the good solution is to make top level on these two workspaces. Just visit the given url workspaces you will get the idea how to manage that kind of flow and single top level package.json

Comments

0

You need to use npm run build to build the react app

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.