-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error while deploying app with Edge Functions #110
Comments
Thanks for reporting this @adamduncan! This was working and was tested so not sure what's up. I'll speak to the team to see if anything changed recently. |
@adamduncan, I figured out the issue. One, the error is because things did get updated on our end, so // Import path interpreted by the Remix compiler
import * as build from "@remix-run/dev/server-build";
import { createRequestHandler } from "@netlify/remix-edge-adapter";
export default createRequestHandler({
build,
// process.env.NODE_ENV is provided by Remix at compile time
mode: process.env.NODE_ENV,
});
export const config = {
cache: "manual",
path: "/*",
// Let the CDN handle requests for static assets, i.e. /_assets/*
//
// Add other exclusions here, e.g. "/api/*" for custom Netlify functions or
// custom Netlify Edge Functions
- excluded_patterns: ["/_assets/*"],
+ excluded_patterns: ["^/_assets/*$"],
}; but also, you'll need to update the I'll create a PR to update both these things. Thanks again for reporting this! |
@nickytonline Thanks for following up on this so swiftly! Appreciate the insights 👍 Yep, looks like with that change to |
Describe the bug
Trying to build and deploy out-of-the-box
remix-template
to Netlify. No modifications made to template after install. App builds and runs locally withnetlify dev
without an issue. When runningnetlify deploy --build
, seeing an error regardingexcluded_patterns
To Reproduce
Steps to reproduce the behavior:
npx create-remix@latest --template netlify/remix-template
TypeScript
npm install
Run your Remix site with: Netlify Edge Functions (beta)
cd
into install directorynetlify dev
(works fine locally, including use of edge functions if created in/netlify/edge-functions/
dir)npm run build
(succeeds)netlify deploy --build
— fails with above message ☝️Expected behavior
Successful deployment to Netlify
Screenshots
Desktop:
Additional context
As suggested, I attempted to set
excluded_patterns
to:excluded_patterns: [/^\/_assets\/\*$/]
— Same error (same regardless of whether string/regex wrapped innew RegExp()
or not)excluded_patterns: ["^/_assets/*$"]
— Builds and deploys successfully (example) but app isn't rendering as expected / as it does locally vianetlify dev
. Note: Interestingly, if I create an edge function, that is behaving as expected (example), even though the app itself isn't rendering.excluded_patterns: []
— As aboveThe text was updated successfully, but these errors were encountered: