eettmm
11/09/2022, 4:25 PMeettmm
11/09/2022, 4:26 PMeettmm
11/09/2022, 4:26 PMTrixrabbit
11/21/2022, 10:41 PMyml
on: [push]
jobs:
deploy:
runs-on: ubuntu-latest
name: Deploy
steps:
- uses: actions/checkout@v3
- name: Publish
uses: cloudflare/wrangler-action@2.0.0
with:
apiToken: ${{ secrets.CF_API_TOKEN }}
accountId: ${{ secrets.CF_ACCOUNT_ID }}
command: pages publish --project-name=example
And I'm getting : [ERROR] Must specify a directory.
From the Wrangler docs, the directory is mandatory, so I'm assuming it is simply missing from the wrangler-action examplesWalshy | Pages
11/21/2022, 10:43 PMWalshy | Pages
11/21/2022, 10:43 PMTrixrabbit
11/21/2022, 10:47 PMyml
command: pages publish ./example-directory --project-name=example
niet
11/22/2022, 12:55 PMspringogeek
11/26/2022, 11:46 AMfunctions/_middleware.ts
file, there's a form on the page, but no emails seem to be sent.springogeek
11/26/2022, 11:57 AMtypescript
import mailchannelsPlugin from "@cloudflare/pages-plugin-mailchannels";
const errorHandler: PagesFunction = async ({ next }) => {
try {
return await next();
} catch (err) {
return new Response(`${err.message}\n${err.stack}`, { status: 500 });
}
};
const mailChannels = (context) => mailchannelsPlugin({
personalizations: () => {
return [
{
to: [{ name: "<my name>", email: "<my email>" }],
}
];
},
from: ({ formData }) => {
return { name: "Enquiry", email: formData.get('email') };
},
respondWith: ({ formData, name }) => {
return new Response(null, {
status: 302,
headers: { Location: "/" },
}),
})(context);
export const onRequest: PagesFunction[] = [errorHandler, mailMiddleware];
DemosJarco
12/01/2022, 10:56 PMgraphql
. But what I don't understand is I already had it installed with npm i graphql
and wrangler pages dev
works.
accesslog
15:19:08.139 1 error(s) and 0 warning(s) when compiling Worker.
15:19:08.141
15:19:08.254 ✘ [ERROR] Could not resolve "graphql"
15:19:08.254
15:19:08.255 api.ts:2:73:
15:19:08.255 2 │ ..., GraphQLSchema, GraphQLObjectType, GraphQLString } from 'graphql';
15:19:08.255 ╵ ~~~~~~~~~
15:19:08.255
15:19:08.255 You can mark the path "graphql" as external to exclude it from the bundle, which will remove this error.
15:19:08.256
15:19:08.256
15:19:08.257 ✘ [ERROR] Build failed with 1 error:
15:19:08.257
15:19:08.257 api.ts:2:73: ERROR: Could not resolve "graphql"
15:19:08.258
15:19:08.258
15:19:08.269 Failed building Pages Functions from /functions.
15:19:09.253 Failed: an internal error occurred
DemosJarco
12/01/2022, 10:56 PMDemosJarco
12/01/2022, 10:57 PMosa
12/02/2022, 1:40 PMdependencies
section of package.json and not devDependencies
?DemosJarco
12/02/2022, 3:18 PMdependencies
. Although I did modify the build script to install dev tooDemosJarco
12/02/2022, 3:22 PMjson
"dependencies": {
"@builder.io/qwik": "^0.15.0",
"@builder.io/qwik-city": "^0.0.128",
"@cloudflare/pages-plugin-graphql": "^1.0.0",
"graphql": "^16.6.0"
},
"devDependencies": {
"@cloudflare/workers-types": "^4.20221111.1",
"@types/eslint": "^8.4.10",
"@types/node": "^18.11.10",
"@typescript-eslint/eslint-plugin": "^5.45.0",
"@typescript-eslint/parser": "^5.45.0",
"eslint": "^8.28.0",
"eslint-plugin-qwik": "^0.15.0",
"node-fetch": "^3.3.0",
"prettier": "^2.8.0",
"typescript": "^4.9.3",
"vite": "^3.2.4",
"vite-tsconfig-paths": "^3.6.0",
"wrangler": "^2.5.0"
}
SirKainey
12/08/2022, 11:26 AMSirKainey
12/08/2022, 11:35 AMeettmm
12/13/2022, 3:50 PMSkye
12/13/2022, 3:58 PMklaemo
12/15/2022, 9:27 AMedheltzel
12/24/2022, 5:07 PMVero 🐙
12/27/2022, 9:57 AMX-Fact
12/28/2022, 6:47 PMcharl
12/29/2022, 10:46 PMcharl
12/29/2022, 10:47 PMX-Fact
12/30/2022, 8:32 AMTJ
01/08/2023, 2:58 PMTJ
01/08/2023, 6:52 PMVero 🐙
01/18/2023, 11:05 AM