remix build doesn't create /build folder and remix-serve build fails
See original GitHub issueWhat version of Remix are you using?
1.6.4
Steps to Reproduce
- Run
npx create-remix@latest
- Run
npx remix build
- Run
npx remix-serve build
Expected Behavior
Expected remix build
to create the /build
and the /public/build
folders.
Actual Behavior
Actual: remix build
does not create the /build
folder and remix-serve build
errors:
Error: Cannot find module '/Users/.../repositoryName/build'
Issue Analytics
- State:
- Created a year ago
- Reactions:1
- Comments:18 (6 by maintainers)
Top Results From Across the Web
[Bug]: Fly deployment doesn't clear build directory #1622
Create Fly based project using npx create-remix@latest ... Open any .js.map file within the public/build directory on the server.
Read more >Remix Build/Deploy Error - "bash: remix: command not found"
Failure when redeploying the currently deployed Remix application, which deployed successfully a couple of weeks ago. Error Log:
Read more >remix-run/dev (CLI)
remix build. Builds your app for production. This command will set process.env.NODE_ENV to production and minify the output for deployment ...
Read more >Is Remix the Next-Gen React Framework You Should Use?
Remix JS is a full stack web framework that lets you build fast, ... Since the HTML pages are loaded on the server,...
Read more >Remix: A guide to the React framework taking on Next.js
Cleaning up the Remix app; Building a form and fetching the weather. How Remix's server-side rendering works with React apps; Does Remix ......
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
i haven’t tried to deploy this, but something like this may work in your remix.config.js
if i remember correctly, vercel will set the
VERCEL
environment variable for you when building. otherwise you could also check forprocess.env.NODE_ENV === "development"
insteadAh, the
server.js
can only be included in Vercel, so we need to make sure it’s excluded when creating the production build locally.