netlify / next-on-netlify Goto Github PK
View Code? Open in Web Editor NEWBuild and deploy Next.js applications with Server-Side Rendering on Netlify!
License: MIT License
Build and deploy Next.js applications with Server-Side Rendering on Netlify!
License: MIT License
Hello,
I've been trying to figure this issue out for the last 7 hours or so, so I decided to finally post an issue.
Next-on-netlify has worked great for my site. I use it with Storyblok CMS. Recently with Netlify updates and the new next-on-netlify v2 there are some breaking changes which I have narrowed down to getInitialProps
.
I have a Page (Index.tsx
) that I export and use on other dynamic routes. If I have getInitialProps
on the Index.tsx
page, client-side routing with next/link
and next/router
doesn't work.
I could live without client-side routing but the bigger issue is that I use react-hook-form and the form submission is broken. Rather than handling submission it is posting form values to the URL like a GET request.
Please let me know if I can share more information. I have worked a long time to figure out the issue and I finally narrowed it down to whether or not I use getInitialProps
. getStaticProps
and getServerSideProps
don't seem to have the issue but I'm not sure if they are good replacements. Currently I am using query
, req
and asPath
in getInitialProps
and it didn't seem like those values were all available in either getStaticProps
or getServerSideProps
.
Thanks for any help or suggestions!
Hi, I was wondering if there is a way to set functions as custom routes that will be picked up by Netlify's identity hooks.
The function that is produced in next-on-netlify
:
What I think Netlify Identity will trigger when someone signs up:
Looking at the docs:
https://docs.netlify.com/functions/functions-and-identity/#trigger-serverless-functions-on-identity-events
I looked at the issue related to (https://github.com/netlify/next-on-netlify#custom-netlify-functions) but don't know that it is the same need here.
This is a weird question/issue I don't know if it is a feature request or a misunderstanding of how these two things interact. Happy to make this an example and add to docs when I better understand what's going on π
I have the following (minimal) example:
// pages/api/preview.js
export default async (req, res) => {
return res.status(404).json({ message: 'Not found' })
}
////////////////////
// pages/index.js
import Link from 'next/link'
function IndexPage() {
return <Link href='/mypage'><a>My page</a></Link>
}
export async function getStaticProps() {
return {
props: {}
}
}
export default IndexPage
////////////////////
// pages/[...slug].js
const SlugPage = () => {
return null
}
export async function getStaticProps({params: {slug}}) {
console.log(`slug = ${slug}`)
return {
props: {}
}
}
export async function getStaticPaths() {
return {
paths: [],
fallback: true
};
}
export default SlugPage
When I run this example using netlify dev
I get an invalid getStaticProps parameter value for slug
: _next,static,chunks,pages,[...slug]-0ab994ad29aa8a4f0aaa.js
.
The full output is:
β Rewrote URL to /.netlify/functions/next_slug
Request from ::1: GET /.netlify/functions/next_slug
info - Loaded env from .env
[request] /_next/static/chunks/pages/%5B...slug%5D-0ab994ad29aa8a4f0aaa.js
slug = _next,static,chunks,pages,[...slug]-0ab994ad29aa8a4f0aaa.js
Response with status 200 in 225 ms.
Request from ::1: GET /.netlify/functions/next_slug
[request] /_next/data/vAFu7puWIo_lpacbTliex/mypage.json
slug = mypage
Response with status 200 in 54 ms.
Is this a bug?
NB. the <Link>
element is necessary to trigger the behaviour.
Hi could you tell me how to create a routing like below:
Thank you
Hey and thanks very much for this project!!
I have a project structure that follows something like this
And i am using the yarn workspaces to make possible using the components in the webapp1, but when i tried to deploy on netlify is says that its requires aws lamba package.
I have tried to put the nohoist
option in webapp1 to prevent the child project packages going to the root and tried locally running the netlify but when i deploy its still failling.
Any idea what can be the issue?
My best regards,
Vitor
Hello,
I have followed the instructions in readme.md but got this error
11:18:41 AM: /opt/build/repo/node_modules/fs-extra/lib/copy-sync/copy-sync.js:62 11:18:41 AM: throw new Error(
'${dest}' already exists) 11:18:41 AM: ^ 11:18:41 AM: Error: 'out_functions/next_glossarium_slug/next_glossarium_slug.js' already exists 11:18:41 AM: at mayCopyFile (/opt/build/repo/node_modules/fs-extra/lib/copy-sync/copy-sync.js:62:11) 11:18:41 AM: at onFile (/opt/build/repo/node_modules/fs-extra/lib/copy-sync/copy-sync.js:54:10) 11:18:41 AM: at getStats (/opt/build/repo/node_modules/fs-extra/lib/copy-sync/copy-sync.js:48:44) 11:18:41 AM: at startCopy (/opt/build/repo/node_modules/fs-extra/lib/copy-sync/copy-sync.js:38:10) 11:18:41 AM: at handleFilterAndCopy (/opt/build/repo/node_modules/fs-extra/lib/copy-sync/copy-sync.js:33:10) 11:18:41 AM: at copySync (/opt/build/repo/node_modules/fs-extra/lib/copy-sync/copy-sync.js:26:10) 11:18:41 AM: at setupNetlifyFunctionForPage (/opt/build/repo/node_modules/next-on-netlify/lib/helpers/setupNetlifyFunctionForPage.js:21:3) 11:18:41 AM: at /opt/build/repo/node_modules/next-on-netlify/lib/pages/getStaticPropsWithFallback/setup.js:21:5 11:18:41 AM: at Array.forEach (<anonymous>) 11:18:41 AM: at setup (/opt/build/repo/node_modules/next-on-netlify/lib/pages/getStaticPropsWithFallback/setup.js:17:9) 11:18:41 AM: npm ERR! code ELIFECYCLE 11:18:41 AM: npm ERR! errno 1 11:18:41 AM: npm ERR! [email protected] postbuild:
next-on-netlify 11:18:41 AM: npm ERR! Exit status 1 11:18:41 AM: npm ERR! 11:18:41 AM: npm ERR! Failed at the [email protected] postbuild script. 11:18:41 AM: npm ERR! This is probably not a problem with npm. There is likely additional logging output above. 11:18:41 AM: npm ERR! A complete log of this run can be found in: 11:18:41 AM: npm ERR! /opt/buildhome/.npm/_logs/2020-11-14T04_18_41_667Z-debug.log
anyone having the same problem?
Hey, nice work with this project!
I've noticed that when I specify a distDir
different from .next
on next.config.js
it fails to run the postbuild.
I noticed that NEXT_BUILD_PATH
const on next-on-netlify.js
is hardcoded to look for .next
folder.
error decoding lambda response: error decoding lambda response: json: cannot unmarshal number into Go struct field APIGatewayProxyResponse.multiValueHeaders of type string
Related: https://community.netlify.com/t/error-decoding-lambda-response/16348
This issue started happening a couple days ago when netlify made an unannounced breaking change as seen in the ticket above.
The same repo I used in #9 is now broken without any changes.
Repo:
https://github.com/wei/next-on-netlify-demo-wei
Example:
https://relaxed-mirzakhani-568b34.netlify.app/api/debug/12345
https://relaxed-mirzakhani-568b34.netlify.app/api/debug/12345?testqs=1
I wonder if this is something that should be done in next-on-netlify library or on my side. Any help is appreciated! π
Hello π
I noticed that I can't build my site when using the new i18n feature. I built dummy repository in which I reproduce the issue.
Page Size First Load JS
β β / 3.44 kB 65.9 kB
β /_app 0 B 62.5 kB
β β /404 3.44 kB 65.9 kB
β Ξ» /api/hello 0 B 62.5 kB
β β /hello 3.45 kB 65.9 kB
+ First Load JS shared by all 62.5 kB
β chunks/f6078781a05fe1bcb0902d23dbbb2662c8d200b3.6d88ef.js 11.4 kB
β chunks/framework.9116e7.js 41.8 kB
β chunks/main.fa2ed4.js 7.99 kB
β chunks/pages/_app.333f97.js 529 B
β chunks/webpack.e06743.js 751 B
β css/6e9ef204d6fd7ac61493.css 194 B
Ξ» (Lambda) server-side renders at runtime (uses getInitialProps or getServerSideProps)
β (Static) automatically rendered as static HTML (uses no initial props)
β (SSG) automatically generated as static HTML + JSON (uses getStaticProps)
(ISR) incremental static regeneration (uses revalidate in getStaticProps)
> serverless-i18n@0.1.0 postbuild C:\Users\<user>\Code\serverless-i18n
> next-on-netlify
οΏ½ Next on Netlify οΏ½
Functions directory: out_functions\
Publish directory: out_publish\
Make sure these are set in your netlify.toml file.
οΏ½οΈ Copying public\ folder to out_publish\
οΏ½ Copying static NextJS assets to out_publish\
οΏ½ Setting up API endpoints as Netlify Functions in out_functions\
pages/api/hello.js
οΏ½ Setting up pages with getInitialProps as Netlify Functions in out_functions\
οΏ½ Setting up pages with getServerSideProps as Netlify Functions in out_functions\
οΏ½ Copying pre-rendered pages with getStaticProps and JSON data to out_publish\
/hello
internal/fs/utils.js:298
throw err;
^
Error: ENOENT: no such file or directory, stat '.next\serverless\pages\hello.html'
at Object.statSync (fs.js:1042:3)
at Object.statSync (C:\Users\<user>\Code\serverless-i18n\node_modules\graceful-fs\polyfills.js:307:34)
at statSync (C:\Users\<user>\Code\serverless-i18n\node_modules\fs-extra\lib\util\stat.js:10:52)
at getStatsSync (C:\Users\<user>\Code\serverless-i18n\node_modules\fs-extra\lib\util\stat.js:24:19)
at Object.checkPathsSync (C:\Users\<user>\Code\serverless-i18n\node_modules\fs-extra\lib\util\stat.js:49:33)
at copySync (C:\Users\<user>\Code\serverless-i18n\node_modules\fs-extra\lib\copy-sync\copy-sync.js:24:38)
at setupStaticFileForPage (C:\Users\<user>\Code\serverless-i18n\node_modules\next-on-netlify\lib\helpers\setupStaticFileForPage.js:11:3)
at C:\Users\<user>\Code\serverless-i18n\node_modules\next-on-netlify\lib\pages\getStaticProps\setup.js:26:5
at Array.forEach (<anonymous>)
at setup (C:\Users\<user>\Code\serverless-i18n\node_modules\next-on-netlify\lib\pages\getStaticProps\setup.js:21:9) {
errno: -4058,
syscall: 'stat',
code: 'ENOENT',
path: '.next\\serverless\\pages\\hello.html'
}
Te repository that reproduces the issue can be accessed here, just run the following
npm i
npm run build
It is a standard next.js application using:
10.0.0
2.6.0
Something interesting to note is that the site builds correctly when I omit the getStaticProps
in hello.js
.
Hi there.
I'm using next-i18next
for translations. The locale files are stored in public/translations
.
As far as I know, Next automatically servers the public folder, and it should have access to it!
When I deploy the project to Netlify, it seems the application does not have access to files. This is the error that shows me:
{
"errorType": "Error",
"errorMessage": "ENOENT: no such file or directory, scandir '/var/task/public/translations/en'",
"trace": [
"Error: ENOENT: no such file or directory, scandir '/var/task/public/translations/en'",
" at Object.readdirSync (fs.js:948:3)",
" at getAllNamespaces (/var/task/src/out_functions/next_index/nextJsPage.js:124241:19)",
" at createConfig (/var/task/src/out_functions/next_index/nextJsPage.js:124246:27)",
" at new NextI18Next (/var/task/src/out_functions/next_index/nextJsPage.js:158492:48)",
" at Object.0v6L (/var/task/src/out_functions/next_index/nextJsPage.js:5428:18)",
" at __webpack_require__ (/var/task/src/out_functions/next_index/nextJsPage.js:31:31)",
" at Module.cha2 (/var/task/src/out_functions/next_index/nextJsPage.js:105080:15)",
" at __webpack_require__ (/var/task/src/out_functions/next_index/nextJsPage.js:31:31)",
" at Module.rxt/ (/var/task/src/out_functions/next_index/nextJsPage.js:146697:17)",
" at __webpack_require__ (/var/task/src/out_functions/next_index/nextJsPage.js:31:31)"
]
}
Note: the application works fine in Development and Production (next build & next start).
Hello,
First of all thanks for the great work with next-on-netlify, highly appreciated!
If have a custom app which makes use of SSR via getInitialProps
.
pages/_app.jsx
:
import React from 'react';
import App from 'next/app';
const MyApp = ({ Component, pageProps, ...customProps }) => {
return <Component {...pageProps} {...customProps} />;
};
// having a custom app with getInitialProps forces all pages to be rendered on the server
MyApp.getInitialProps = async (ctx) => {
const appProps = App.getInitialProps(ctx);
return {
...appProps,
somePropFrom_app: "Hello from the _app"
};
};
export default MyApp;
Also I have a catch-all page which is used as the index page and as a fallback if there is no matching page for the current route (obviously).
pages/[[...any]].jsx
:
import React, { useEffect, useState } from 'react';
export default ({ somePropFrom_app }) => {
const [ someState, setSomeState ] = useState('waiting for client side code execution...');
useEffect(() => {
setSomeState('client side code was executed properly!')
});
return (
<main>
<p>{somePropFrom_app}</p>
<p>{someState}</p>
</main>
)
}
When I access the catch-all page it is being rendered on the server correctly, but the client side rendering fails. It seems the server sends the rendered HTML instead of the JS source code when the frontend fetches the static JS chunk for this page.
When I look at the network tab, I can see that the browser tried to fetch the JS chunk, but received fully rendered HTML instead:
As far as I could test it, this seems not to happen for catch-all pages within subdirectories. For example
pages/foo/[[...any]].jsx
works as expected.
I have set up a minimal repository which reproduces the issue: https://github.com/Yegair/next-on-netlify-minimal.
You can also have a look at the running example here: https://condescending-allen-4992da.netlify.app/
This issue may be related to #41 (at least the workaround is the same).
As I said above, the Workaround from #41 seems to resolve the issue.
Just add a "No-Op redirect" for the /_next/*
route:
_redirects
:
/_next/* /_next/:splat 200
With version 2.4.0
yarn run build
produces the following (correct) out_publish/_redirects
file:
# Next-on-Netlify Redirects
/api /.netlify/functions/next_api 200
* /.netlify/functions/next_any 200
Using 2.5.0
the sorting has changed, and the catch all rules are before the specific ones:
# Next-on-Netlify Redirects
/* /.netlify/functions/next_any 200
/.netlify/functions/next_any 200
/api /.netlify/functions/next_api 200
We can see the /*
catch route is before the /api
route. Additionally, there is a new (and possible invalid) redirect.
Now the requests to /api
are routed to /
and the specific handler is not called.
I created a minimal example repo here: https://github.com/amuttsch/next-on-netlify-minimal
To reproduce just change the version of next-on-netlify
in the package.json
to 2.4.0
or 2.5.0
and run yarn install && yarn run build
.
Thanks for your work on this package!
Hi!
I've got a Next app on Netlify and it works amazing! Thank you for your great work! I've had no problems thus far, except with the following syntax:
export const getServerSideProps: GetServerSideProps = async ({ req, res }) => {
const auth = await authenticate({ req, res });
if (!auth.isLoggedIn) {
return { redirect: { destination: loginRoute, permanent: false } };
}
const { currentUser, access } = auth;
const events = await getEvents();
return {
props: {
currentUser,
events,
},
};
};
Which returns the error on Netlify:
1:05:13 PM: 2020-11-15T12:05:13.456Z 0d58c161-5d0b-4a41-9724-a1b67fee275f INFO [request] /scheduling
1:05:13 PM: 2020-11-15T12:05:13.600Z 0d58c161-5d0b-4a41-9724-a1b67fee275f ERROR Unhandled error during request: TypeError [ERR_INVALID_ARG_TYPE]: The "string" argument must be of type string or an instance of Buffer or ArrayBuffer. Received null
at Function.byteLength (buffer.js:726:11)
at sendPayload (/var/task/src/out_functions/next_scheduling/nextJsPage.js:21039:844)
at renderReqToHTML (/var/task/src/out_functions/next_scheduling/nextJsPage.js:16899:15)
at processTicksAndRejections (internal/process/task_queues.js:97:5)
at async Module.render (/var/task/src/out_functions/next_scheduling/nextJsPage.js:16969:22) {
code: 'ERR_INVALID_ARG_TYPE'
}
1:05:13 PM: 2020-11-15T12:05:13.600Z 0d58c161-5d0b-4a41-9724-a1b67fee275f ERROR TypeError [ERR_INVALID_ARG_TYPE]: The "string" argument must be of type string or an instance of Buffer or ArrayBuffer. Received null
at Function.byteLength (buffer.js:726:11)
at sendPayload (/var/task/src/out_functions/next_scheduling/nextJsPage.js:21039:844)
at renderReqToHTML (/var/task/src/out_functions/next_scheduling/nextJsPage.js:16899:15)
at processTicksAndRejections (internal/process/task_queues.js:97:5)
at async Module.render (/var/task/src/out_functions/next_scheduling/nextJsPage.js:16969:22) {
code: 'ERR_INVALID_ARG_TYPE'
}
1:05:13 PM: 2020-11-15T12:05:13.601Z 0d58c161-5d0b-4a41-9724-a1b67fee275f ERROR Unhandled Promise Rejection {"errorType":"Runtime.UnhandledPromiseRejection","errorMessage":"TypeError [ERR_INVALID_ARG_TYPE]: The \"string\" argument must be of type string or an instance of Buffer or ArrayBuffer. Received null","reason":{"errorType":"TypeError","errorMessage":"The \"string\" argument must be of type string or an instance of Buffer or ArrayBuffer. Received null","code":"ERR_INVALID_ARG_TYPE","stack":["TypeError [ERR_INVALID_ARG_TYPE]: The \"string\" argument must be of type string or an instance of Buffer or ArrayBuffer. Received null"," at Function.byteLength (buffer.js:726:11)"," at sendPayload (/var/task/src/out_functions/next_scheduling/nextJsPage.js:21039:844)"," at renderReqToHTML (/var/task/src/out_functions/next_scheduling/nextJsPage.js:16899:15)"," at processTicksAndRejections (internal/process/task_queues.js:97:5)"," at async Module.render (/var/task/src/out_functions/next_scheduling/nextJsPage.js:16969:22)"]},"promise":{},"stack":["Runtime.UnhandledPromiseRejection: TypeError [ERR_INVALID_ARG_TYPE]: The \"string\" argument must be of type string or an instance of Buffer or ArrayBuffer. Received null"," at process.<anonymous> (/var/runtime/index.js:35:15)"," at process.emit (events.js:315:20)"," at processPromiseRejections (internal/process/promises.js:209:33)"," at processTicksAndRejections (internal/process/task_queues.js:98:32)"]}
1:05:13 PM: [ERROR] [1605441913603] LAMBDA_RUNTIME Failed to post handler success response. Http response code: 403.
1:05:13 PM: Duration: 153.22 ms Memory Usage: 94 MB Init Duration: 401.18 ms
1:05:13 PM: RequestId: 0d58c161-5d0b-4a41-9724-a1b67fee275f Error: Runtime exited with error: exit status 128
Runtime.ExitError
The real frustrating thing is βΒ this works great locally when running next dev
, and even works great when running a site built with next-on-netlify
via netlify-cli
, but breaks when actually deployed to Netlify. This is visible here.
I'd love to help out and make a PR to fix this if possible. If the issue isn't on this project, but is a general flaw with Netlify Functions, I apologize. I tried to find the best place to report this and this repo seemed ideal.
Thanks for the great package!
I set up a brand new default Next.js install and added the code according to README.md
Page Size First Load JS
β β / 2.31 kB 65.4 kB
β β /404 3.15 kB 61.3 kB
β Ξ» /api/hello
+ First Load JS shared by all 58.2 kB
β static/pages/_app.js 954 B
β chunks/8e104c923a7c97406870fb6411b5f33e5dd2a109.1f6f8d.js 10.5 kB
β chunks/framework.c6faae.js 40 kB
β runtime/main.9e3c24.js 5.97 kB
β runtime/webpack.c21266.js 746 B
Ξ» (Lambda) server-side renders at runtime (uses getInitialProps or getServerSideProps)
β (Static) automatically rendered as static HTML (uses no initial props)
β (SSG) automatically generated as static HTML + JSON (uses getStaticProps)
public/_redirects
# Next-on-Netlify Redirects
/index /_next/pages/index.html 200
/ /_next/pages/index.html 200
/404 /_next/pages/404.html 200
/_error /.netlify/functions/nextRouter?_path=/_error 200
/api/hello /.netlify/functions/nextRouter?_path=/api/hello 200
Note that the pages/index.js has no getInitialProps
, getServerSideProps
, or getStaticProps
The routes under /.netlify/functions
works fine (e.g. /api/hello
) but the routes pointing to /_next
(/
, /index
, /404
) do not work.
getServerSideProps
to pages/index.js
:Page Size First Load JS
β Ξ» / 6.97 kB 65.1 kB
β β /404 3.15 kB 61.3 kB
β Ξ» /api/hello
+ First Load JS shared by all 58.2 kB
β static/pages/_app.js 954 B
β chunks/9d5858f224b9f6cb55e0eaaa0a3efae572052440.1f6f8d.js 10.5 kB
β chunks/framework.c6faae.js 40 kB
β runtime/main.c2a2c7.js 5.97 kB
β runtime/webpack.c21266.js 746 B
public/_redirects
# Next-on-Netlify Redirects
/404 /_next/pages/404.html 200
/_error /.netlify/functions/nextRouter?_path=/_error 200
/api/hello /.netlify/functions/nextRouter?_path=/api/hello 200
/index /.netlify/functions/nextRouter?_path=/index 200
/ /.netlify/functions/nextRouter?_path=/ 200
The routes /
, /index
now work fine as they are pointing to the function under /.netlify/functions
but /404
still does not work as it's pointing to files under /_next/pages/404
.
The Next.js samples for preview mode involve doing a redirection from an api route. The code is something like:
res.setPreviewData({
maxAge: 60 * 60 // The preview mode cookies expire in 1 hour
})
res.writeHead(307, { Location: `/${req.query.contentType}/${req.query.slug}` })
I can do this from next run
, but if I try this on Netlify it seems to strip the location header on the 307 redirect. Is this something to do with the compat
call or am I doing something wrong?
Hi,
Cool project! I was looking for something similar for quite long, and your solution seems to work pretty well!
The current implementation doesn't support rendering of the 404.html
file, if an unknown URL is requested. For example, try this link: https://next-on.netlify.com/some-non-existing-url
- it should actually render _next/pages/404.html
file.
A quick fix that I've found for this problem is to simply copy the 404.html
file to public
in a post-build step. Something like cp public/_next/pages/404.html public
. The reason is that Netlify are expecting to find this file exactly on this place. But I wonder if that's the right solution, or if there are better ways. Another approach that I've tried was to add /* /_next/pages/404.html 404
at the end of _redirects
file, but it didn't work very well with netlify-dev
.
Would love to hear your thoughts. Thanks :)
"Packaging Functions from out_functions directory:" - seems to never end or take very long with Netlify cancelling build...
9:29:51 PM: Packaging Functions from out_functions directory:
9:29:51 PM: - next_createlivefeedback/next_createlivefeedback.js
9:29:51 PM: - next_feedbacksurvey_0introductionpage/next_feedbacksurvey_0introductionpage.js
9:29:51 PM: - next_feedbacksurvey_11corevalues/next_feedbacksurvey_11corevalues.js
9:29:51 PM: - next_feedbacksurvey_12corevalues/next_feedbacksurvey_12corevalues.js
9:29:51 PM: - next_feedbacksurvey_13corevalues/next_feedbacksurvey_13corevalues.js
9:29:51 PM: - next_feedbacksurvey_14corevalues/next_feedbacksurvey_14corevalues.js
9:29:51 PM: - next_feedbacksurvey_2comment/next_feedbacksurvey_2comment.js
9:29:51 PM: - next_feedbacksurvey_31skills/next_feedbacksurvey_31skills.js
9:29:51 PM: - next_feedbacksurvey_32skills/next_feedbacksurvey_32skills.js
9:29:51 PM: - next_feedbacksurvey_33skills/next_feedbacksurvey_33skills.js
9:29:51 PM: - next_feedbacksurvey_34skills/next_feedbacksurvey_34skills.js
9:29:51 PM: - next_feedbacksurvey_35skills/next_feedbacksurvey_35skills.js
9:29:51 PM: - next_feedbacksurvey_36skills/next_feedbacksurvey_36skills.js
9:29:51 PM: - next_feedbacksurvey_4comment/next_feedbacksurvey_4comment.js
9:29:51 PM: - next_feedbacksurvey_completed/next_feedbacksurvey_completed.js
9:29:51 PM: - next_index/next_index.js
9:29:51 PM: - next_knowledgecenter_article/next_knowledgecenter_article.js
9:29:51 PM: - next_knowledgecenter_search/next_knowledgecenter_search.js
9:29:51 PM: - next_mylivefeedback/next_mylivefeedback.js
9:29:51 PM: - next_mytasks/next_mytasks.js
9:29:51 PM: - next_myteam/next_myteam.js
9:29:51 PM: - next_mytools/next_mytools.js
9:29:51 PM: - next_performance_editobjective/next_performance_editobjective.js
9:29:51 PM: - next_performance_myobjectives/next_performance_myobjectives.js
9:29:51 PM: - next_performance_myperformance/next_performance_myperformance.js
9:29:51 PM: - next_performance_newobjective/next_performance_newobjective.js
9:29:51 PM: - next_performance_submitreview/next_performance_submitreview.js
9:29:51 PM: - next_performance_viewobjective/next_performance_viewobjective.js
9:29:51 PM: - next_report_attachments/next_report_attachments.js
9:29:51 PM: - next_report_corevalues/next_report_corevalues.js
9:29:51 PM: - next_report_cover/next_report_cover.js
9:29:51 PM: - next_report_info/next_report_info.js
9:29:51 PM: - next_report_objectives/next_report_objectives.js
9:29:51 PM: - next_report_openquestions/next_report_openquestions.js
9:29:51 PM: - next_report_skills/next_report_skills.js
9:29:51 PM: - next_report_writeup/next_report_writeup.js
9:29:51 PM: - next_selfevaluation_0introductionpage/next_selfevaluation_0introductionpage.js
9:29:51 PM: - next_selfevaluation_11corevalues/next_selfevaluation_11corevalues.js
9:29:51 PM: - next_selfevaluation_12corevalues/next_selfevaluation_12corevalues.js
9:29:51 PM: - next_selfevaluation_13corevalues/next_selfevaluation_13corevalues.js
9:29:51 PM: - next_selfevaluation_14corevalues/next_selfevaluation_14corevalues.js
9:29:51 PM: - next_selfevaluation_21myskills/next_selfevaluation_21myskills.js
9:29:51 PM: - next_selfevaluation_22myskills/next_selfevaluation_22myskills.js
9:29:51 PM: - next_selfevaluation_23myskills/next_selfevaluation_23myskills.js
9:29:51 PM: - next_selfevaluation_24myskills/next_selfevaluation_24myskills.js
9:29:51 PM: - next_selfevaluation_25myskills/next_selfevaluation_25myskills.js
9:29:51 PM: - next_selfevaluation_26myskills/next_selfevaluation_26myskills.js
9:29:51 PM: - next_selfevaluation_31yourobjectives/next_selfevaluation_31yourobjectives.js
9:29:51 PM: - next_selfevaluation_32yourobjectives/next_selfevaluation_32yourobjectives.js
9:29:51 PM: - next_selfevaluation_41performancereview/next_selfevaluation_41performancereview.js
9:29:51 PM: - next_selfevaluation_42performancereview/next_selfevaluation_42performancereview.js
9:29:51 PM: - next_selfevaluation_attachments/next_selfevaluation_attachments.js
9:29:51 PM: - next_selfevaluation_completed/next_selfevaluation_completed.js
9:29:51 PM: - next_skills_myskills/next_skills_myskills.js
....
9:42:31 PM: Canceling deploy
9:42:37 PM: Execution timed out after 17m7.720807482s
9:42:37 PM: Error running command: Command did not finish within the time limit
9:42:37 PM: Failing build: Failed to build site
9:43:07 PM: Failed to inform the API about a failed build, please retry the build or contact support
9:43:07 PM: Finished processing build request in 17m54.632197674s
Building my package locally using yarn build
only takes 90 seconds, with the out_functions
folder only being 12mb large and out_publish
being 68mb.
However, the Netlify deployment process will take a total of 27 mins to complete:
9:19:05 PM: (@netlify/plugin-functions-core onBuild completed in 19m 46.8s)
9:19:05 PM: β
9:19:05 PM: βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
9:19:05 PM: β 4. onPostBuild command from netlify-plugin-cache-nextjs β
9:19:05 PM: βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
9:19:05 PM: β
9:19:07 PM: Cached the .next folder at the location `.next/cache`
9:19:07 PM: β
9:19:07 PM: (netlify-plugin-cache-nextjs onPostBuild completed in 1.5s)
9:19:07 PM: β
9:19:07 PM: βββββββββββββββββββββββββββββββ
9:19:07 PM: β Netlify Build Complete β
9:19:07 PM: βββββββββββββββββββββββββββββββ
9:19:07 PM: β
9:19:07 PM: (Netlify Build completed in 24m 45.4s)
9:19:07 PM: Execution timed out after 26m45.2292702s
9:19:07 PM: Error running command: Command did not finish within the time limit
9:19:07 PM: Failing build: Failed to build site
9:19:07 PM: Failed during stage 'building site': Command did not finish within the time limit
9:19:07 PM: Finished processing build request in 27m21.584174186s
Running zip-it-and-ship-it out_functions zipped_functions
creates a folder called zipped_functions
which is 1.55gb large! It creates 21 zip files (one for each route), each are around 60 - 90 mb each.
Wondering how we can reduce this. As we really want to use Netlify for server-side rendering our NextJS package.
Don't know exactly if this is next-on-netlify issue or if it's related to netlify-cli.
Basically after running dev version on localhost or even deploying to netlify and visiting served page, you are automatically redirected to 404.
Here is how I managed to encounter a problem:
Visiting any page over URL directly (except index) works as expected, even navigation over all pages after works normally. The only problem is direct visit to /.
Anyone else experiencing this?
Node 10.13.0
is the minimal version supported by Next.js 9/10.
However, the CI tests currently run Node 10.17.0
. They should run 10.13.0
instead.
Hello! Thanks for all your hard work on this project.
Before V2 I used client-side routing but now I find that the links are not working. This applies to next/link as well as next/router.
Please let me know if there is any more information I can provide or anything I can do to help.
When you go to https://next-on.netlify.com/, it redirects to https://next-on.netlify.app/ and shows the error:
error decoding lambda response: error decoding lambda response: json: cannot unmarshal number into Go struct field APIGatewayProxyResponse.multiValueHeaders of type string
I have a feeling this has to do with this announcement from the team about domains being moved to .app
.
I'm trying to read the host in getServerSideProps. It works in local environment with
next dev (obviously)
next build && netlify dev
However when deployed on netlify with this plugin,
req.headers.host is undefined. Any info on this? Thank you.
I've been following this example and it works on "standard netlify" : https://github.com/garrypolley/deployment-example-netlify
I'm attempting to use next as well on a private site API ID: c076fc19-1890-4dd6-b610-1b57342b8c39
Whenever any attempt to query the database is made I get the following error:
Query engine binary for current platform "rhel-openssl-1.0.x" could not be found.
This probably happens, because you built Prisma Client on a different platform.
(Prisma Client looked in "/query-engine-rhel-openssl-1.0.x")
Files in /:
bin
boot
dev
etc
home
lib
lib64
media
mnt
opt
proc
root
run
sbin
srv
sys
tmp
usr
var
You already added the platforms "native", "rhel-openssl-1.0.x" to the "generator" block
in the "schema.prisma" file as described in https://pris.ly/d/client-generator,
but something went wrong. That's suboptimal.
Please create an issue at https://github.com/prisma/prisma-client-js/issues/new
I believe this is because the rhel binary is not shipping inside the bundled function that goes in the out_functions
directory.
I've tried a lot of options:
I think if the rhel binary can be found on the running lambda disk then this environment variable could be set and it'd work PRISMA_QUERY_ENGINE_BINARY
There are a few issues logged for this across Netlify and Primsa githubs. And also a community post as well https://community.netlify.com/t/prisma-client-binary-not-copied-for-netlify-lambda-functions-for-graphql-server/11701
I'm happy to help troubleshoot further.
The Netlify platform does file shadowing, where the static file is delivered first regardless:
https://docs.netlify.com/routing/redirects/rewrites-proxies/#shadowing
Example in _redirects:
/health/en/kids/emily-story/article /health/en/kids/emily-story/article.html 200
I ask, because we are pre-rendering + SSG many thousands (15,000+) of pages. So the _headers files has an entry for each. Also, the console log prints a line for each during build.
While this project solves pretty much everything I would need from a product point of view, the fact it heavily relies on Netlify functions - even for routes that could benefit from static exporting - makes the outcome potentially expensive once you reach Netlify's limits for function execution.
I'm wondering if it would be possible easily combine the benefits of both approaches. The idea would be to reuse next export
results, and then adapt next-on-netlify
redirects so those direct paths to statically exported HTML can be used as is, with no function related to it - while still fall-backing to the serverless route when reaching a non-built route.
This could potentially reduce build time - my project went from 3m to 7m after installing this package - and highly decrease usage costs overall.
Can you also add for target: 'experimental-serverless-trace'
.
I'm using firebase, but the build returns an error:
Build error occurred
Error: ENOENT: no such file or directory, open 'google/protobuf/api.proto'
Previously used, target: 'serverless'
is going to be deprecated.
Reference: vercel/next.js#11860
I spent quite some time editing my netlify.toml
, trying to consolidate the outputs into one folder with subfolders, i.e.:
[build]
command = "npm run build"
functions = "out/functions"
publish = "out/publish"
I ran npm run build
and was confused that it would still output to out_functions
and out_publish
folders. Then I realised these are hard-coded and cannot be configured.
Could we make this configurable? If not, could we make it clearer in the README that these are fixed directory names?
Situation: I was trying to allow requests to /random
to be proxied to /api/random
.
I edited my netlify.toml
to add this:
[[redirects]]
from = "/random"
status = 200 # turns the redirect into a proxy
to = "/api/random"
But ended up getting this output under out_publish/_redirects
(i.e. the custom proxy wasn't registered):
# Next-on-Netlify Redirects
/ /.netlify/functions/next_index 200
/api/random /.netlify/functions/next_api_random 200
/* /:splat 200
I tried creating a _redirects
file instead:
/random /api/random 200
This was being picked up in the output π
/random /api/random 200!
# Next-on-Netlify Redirects
/ /.netlify/functions/next_index 200
/api/random /.netlify/functions/next_api_random 200
/* /:splat 200
However, requests to /random
continued to 404. I guessed this was because Netlify only allow one hop. So I changed the contents or _redirects
to:
/random /.netlify/functions/next_api_random 200!
...and now it's doing what I want π
I don't think there's much we can do about the one-hop limit, but next-on-netlify claims to look at the netlify.toml for redirects, and that doesn't appear to be working π€ is this a bug?
I have the following page structure:
Page
β /_app
β β /[[...rest]]
β β /
β β /careers
β β /404
β Ξ» /api/preview
Command build
runs successfully but running next-on-netlify
spits out the following error:
Error: You cannot define a route with the same specificity as a optional catch-all route ("/" and "/[[...rest]]").
Hi,
I try to access this function
https://sonnet-18.netlify.app/.netlify/functions/github
but got 404
instead, the function created on Netlify is
https://sonnet-18.netlify.app/.netlify/functions/next_compare?repos=FinnWoelm%23next-on-netlify,cassidoo%23sonnet-18
Is this because of next-on-netlify v2 or multiValueHeaders change?
Hello everyone, as you might already know Next now has a new Image Component and I was thinking if its possible to support it on Netlify ?
At our company we are very tight with the whole Netlify ecosystem, we use Netlify CMS and we use Netlify for publishing almost everything that we have & we cant afford to switch to Vercel just for this component.
The new Image component is very good but sadly I found out that they only support that on Vercel hosted sites, We are not very familiar with next-on-netlify
thus we can't do a PR, but we are willing to help out during the PR with testing, docs, or whatever is needed.
Thank you
"Cannot find module 'next-aws-lambda'\n" +
'Require stack:\n' +
'- C:\Users\Riz\Desktop\basey2\out_functions\next_api_hello\next_api_hello.js\n' +
'- C:\Users\Riz\scoop\persist\nvm\nodejs\v14.10.1\node_modules\netlify-cli\node_modules\lambda-local\build\lambdalocal.js\n' +
'- C:\Users\Riz\scoop\persist\nvm\nodejs\v14.10.1\node_modules\netlify-cli\src\utils\serve-functions.js\n' +
'- C:\Users\Riz\scoop\persist\nvm\nodejs\v14.10.1\node_modules\netlify-cli\src\commands\dev\index.js\n' +
'- C:\Users\Riz\scoop\persist\nvm\nodejs\v14.10.1\node_modules\netlify-cli\node_modules\@oclif\config\lib\plugin.js\n' +
'- C:\Users\Riz\scoop\persist\nvm\nodejs\v14.10.1\node_modules\netlify-cli\node_modules\@oclif\config\lib\config.js\n' +
'- C:\Users\Riz\scoop\persist\nvm\nodejs\v14.10.1\node_modules\netlify-cli\node_modules\@oclif\config\lib\index.js\n' +
'- C:\Users\Riz\scoop\persist\nvm\nodejs\v14.10.1\node_modules\netlify-cli\node_modules\@oclif\command\lib\command.js\n' +
'- C:\Users\Riz\scoop\persist\nvm\nodejs\v14.10.1\node_modules\netlify-cli\node_modules\@oclif\command\lib\index.js\n' +
'- C:\Users\Riz\scoop\persist\nvm\nodejs\v14.10.1\node_modules\netlify-cli\src\index.js\n' +
'- C:\Users\Riz\scoop\persist\nvm\nodejs\v14.10.1\node_modules\netlify-cli\bin\run',
Hello, my team currently has a project that's using Netlify to host the production build. However, we've been been getting 404 errors when trying to access the content (it's a dynamic route created when users upload videos.)
We were trying to use next-on-netlify to troubleshoot this issue, but after modifying the config files and updating the build we began receiving this error:
3:46:04 PM: ./node_modules/dom-helpers/cjs/addClass.js
3:46:04 PM: Self-reference dependency has unused export name: This should not happen
This was after receiving several unresolved dependency errors and adding them in an attempt to meet the dependency needs. We're trying to push this project into production soon, but our core issue has ultimately been rendering these dynamic content pages on netlify properly.
Happy to provide more details in an attempt to solve this error.
I just started using this project but ran into a show stopper when running my build.
12:45:11 PM: > next build
12:45:12 PM: Warning: No build cache found. Please configure build caching for faster rebuilds. Read more: https://err.sh/next.js/no-cache
12:45:12 PM: Creating an optimized production build...
12:45:55 PM: Failed to compile.
12:45:55 PM:
12:45:55 PM: ./node_modules/next/dist/lib/resolve-request.js
12:45:55 PM: Module not found: Can't resolve 'pnpapi' in '/opt/build/repo/node_modules/next/dist/lib'
12:45:55 PM: > Build error occurred
12:45:55 PM: Error: > Build failed because of webpack errors
12:45:55 PM: at build (/opt/build/repo/node_modules/next/dist/build/index.js:13:917)
12:45:55 PM: at process._tickCallback (internal/process/next_tick.js:68:7)
12:45:55 PM: npm
12:45:55 PM: ERR! code ELIFECYCLE
12:45:55 PM: npm
12:45:55 PM: ERR! errno
12:45:55 PM: 1
12:45:55 PM: npm
12:45:55 PM: ERR! [email protected] build: `next build`
12:45:55 PM: npm ERR! Exit status 1
12:45:55 PM: npm ERR!
12:45:55 PM: npm ERR!
12:45:55 PM: Failed at the [email protected] build script.
12:45:55 PM: npm
12:45:55 PM: ERR! This is probably not a problem with npm. There is likely additional logging output above.
12:45:55 PM: npm
12:45:55 PM: ERR! A complete log of this run can be found in:
12:45:55 PM: npm ERR!
12:45:55 PM: /opt/buildhome/.npm/_logs/2020-06-01T18_45_55_956Z-debug.log
I can't seem to get around this, but I'm also at a loss trying to figure out what the issue really is.
I'm running Next 9.4.4 and Node 12/13
I love your guys package and really enjoy using netlify and nextjs with an api.
I've ran into an issue where I can't build using this package when I also am using sequelize. I am wondering if I am able to get some help or possibly contribute to this package to get it working.
ModuleNotFoundError: Module not found: Error: Can't resolve 'pg-native' in '/opt/build/repo/node_modules/pg/lib/native'
I've tried altering my next.config.js to try and work around this errors. It would build locally and on netlify, but fail when creating the netlify functions with the same errors.
module.exports = { // Target must be serverless target: 'serverless', webpack: (config, { webpack }) => { // Note: we provide webpack above so you should not
require it // Perform customizations to webpack config config.plugins.push(new webpack.IgnorePlugin(/\/__tests__\//)); config.externals = [ ...config.externals, 'pg', 'sqlite3', 'tedious', 'pg-hstore', ]; // Important: return the modified config return config; }, };
{ "name": "with-typescript", "version": "1.0.0", "scripts": { "dev": "next", "build": "next build", "start": "next start", "postbuild": "next-on-netlify", "type-check": "tsc" }, "dependencies": { "@material-ui/core": "^4.11.0", "@material-ui/icons": "^4.9.1", "@types/lodash": "^4.14.159", "@types/nodemailer": "^6.4.0", "@types/sequelize": "^4.28.9", "axios": "^0.19.2", "babel-plugin-react-intl": "^8.1.1", "lodash": "^4.17.19", "netlify-plugin-cache-nextjs": "^1.5.0", "next": "latest", "next-on-netlify": "^2.3.2", "nodemailer": "^6.4.11", "notistack": "^0.9.17", "pg": "^8.3.0", "pg-hstore": "^2.3.3", "react": "^16.13.1", "react-dom": "^16.12.0", "react-intl-hooks": "^1.0.11", "sequelize": "^6.3.4" }, "devDependencies": { "@types/node": "^12.12.21", "@types/pg": "^7.14.4", "@types/react": "^16.9.46", "@types/react-dom": "^16.9.8", "typescript": "^3.9.7" }, "license": "ISC" }
I've tried to create the sequelize connection multiple different ways but build is always failing. Here is what I have currently:
const sequelize = new Sequelize({ database, username, password, port, host: process.env.HOST, protocol: 'postgres', dialect: 'postgres', dialectModule: require('pg'), dialectOptions: { ssl: { rejectUnauthorized: false, }, }, logging: false, });
Any help on this issue would be incredible. Thank you!
First off, love this project.
I have an issue, but I'm not sure if its this project's responsibility or next in general. In my project, I have a single route that's a fully dynamic route /[businessUnit]/[pageSlug]/[hash]
and locally if you hit /
, /sales
, /sales/qs
it returns the error page, but once deployed it shows the Netlify no route found message instead of the error page. Any thoughts on how this should be approached with next-on-netlify
?
As mentioned in the Readme. I need support for custom netlify functions.
It would at least help to move every thing from "/functions" to the "/out_functions".
Which i will do myself as an Workaround.
whethter consider use https://github.com/ykfe/ssr for developing a serverless side render application quickly which is more in line with serverless than next.js
When using API routes, it appears the context
from Netlify is not passed to the page callback. This is important when using Netlify Identity for authenticated endpoints.
Hi there!
Thank you so much for this awesome utility. We have been loving it so far!
We're running into an issue where our custom redirects are showing up in our local build, but when deploying to Netlify, all we see are the # Next-on-Netlify Redirects
.
Here's our netlify.toml file:
[build]
command = "npm run build"
functions = "out_functions"
publish = "out_publish"
[dev]
functions = "functions"
publish = "public"
# We manually set the framework to static, otherwise Netlify automatically
# detects NextJS and redirects do not work.
# Read more: https://github.com/netlify/cli/blob/master/docs/netlify-dev.md#project-detection
framework = "#static"
Here's our _redirect file in the root of our project that should redirect /test to our home page:
/test/ /
Here are our scripts in our package.json:
"scripts": {
"dev": "next",
"build": "next build",
"start": "next start",
"postbuild": "next-on-netlify"
},
The custom redirect does not get added to the out_publish/_redirects
file on Netlify, but if we create build locally, it does.
We've even tried re-deploying with cache clear and no luck.
Do you have any ideas of what might be happening here? We also tried adding this redirect to our netlify.toml file, and still had no luck.
Thank you!
Hi there,
Thanks for the great project!
I've encountered this error while building a prod version of my nextJS app (dev version is fine):
Error: 'out_publish/index.html' already exists
I first saw this in the netlify CI, but was able to reproduce locally too. I have already followed the instructions here.
You can see my repo here, it's a pretty basic setup and definitely doesn't have a spare index.js
in the pages directory messing with things :)
Based on the build output, it looks like it is picking up two index.html
files to copy
But I don't see that in the .next
output myself:
Deps:
"next-on-netlify": "^2.4.0",
"next": "latest", // evaluated to 9.4.4
Thanks again for your great work, let me know if I can provide any more details to help debug this issue.
This issue is exactly the same issue statued here #40 but with x-forwarded-host
header.
It would be good to check if the user configuration is a function, as it is very common to use compose plugins (next-compose-plugins for example) in next.js projects.
I am trying to use the Google Firebase Web SDK (Firestore, Storage and Analytics) on a Next.js project hosted on Netlify with next-on-netlify
.
I have some pages strictly using Firebase Firestore APIs once the page has loaded, and other pages are using Firestore APIs within the getServerSideProps()
function. Still inconclusive, but it appears that the pages using Firestore within getServerSideProps
are not working. There are two symptoms:
{"errorMessage":"2020-10-28T23:52:17.325Z 4833e28b-d8c9-47bb-ad04-39d813a0b378 Task timed out after 10.01 seconds"}
11:51:22 PM: 2020-10-28T23:51:22.407Z 516720dc-661b-4f02-928d-6ca151031376 WARN Error enabling offline persistence. Falling back to persistence disabled: Error: ENOENT: no such file or directory, open '/src/protos/google/firestore/v1/firestore.proto'
Is there a way around this, or am I doing something wrong?
Everything appears to be working fine on my local machine when I am developing using npm run dev
- including SSR. Hence, this might be an issue related to Netlify-Next.js-Firebase.
I found this post on the Netlify community forums which suggests I am not the only one with the issue. But unlike that user, I am not using Netlify lambdas/functions nor am I used the firebase-admin
SDK (server-side library). The resolution from this post is also inconclusive, citing: "Note that even though the write succeeded ... the function did not return a 200 and βSuccess!ββ¦ or a 500. It returned a 502 with a timeout error at the endpoint"
I'm so excited about v2 of this library! Unfortunately I ran into a couple issues with it when trying to query an API based on a dynamic route.
Here's what my code looked like before with getStaticProps
and using the new incremental stuff:
https://github.com/cassidoo/sonnet-18/blob/c91e5468e5524b773537a89b73fbd7632ea735e4/pages/compare/%5B...slug%5D.js
And it works great when I change it to use getInitialProps
:
https://github.com/cassidoo/sonnet-18/blob/master/pages/compare.js
The code is doing pretty much the exact same thing, except I pull it from a query string in the latter, and from the dynamic path in the first one. It worked fine locally on my machine, but on Netlify itself when I tried to navigate to the paths, it gave a 500 error.
I do prefer the query string way, but when talking with the Next.js team themselves, they recommended the other way with the paths, and I'd like to stick with the recommended way if I can.
I tried debugging a few times but this seems to the the only working solution for now. Happy to give more info if needed!
I have a netlify-lambda function that generates an api.js file into out_functions and then I run the next build and this erases the contents of the out_functions folder removing my api.s file and populates it with the nextjs functions. Is there anyway to change the folder directory or another way around this to prevent it overwriting my other file?
Full support for the Next 9.3 getStaticProps/getServerSideProps page functions
I recently started deploying a site using next-on-netlify (thank you so much for this plugin, you have saved my team a ton of heartache) and would like to take advantage of getStaticProps, so we can statically generate some content from our CMS at build time.
As you can see above, the resources aren't getting generated for the new page types. The pages still load, and has the data generated with SSR, but it's generating the page on demand and not statically at build.
Generate pages with getStaticProps as static. Would be happy to help, but am not sure where to start looking.
Accept the outcome but remove the 404 errors by using getInitialProps instead
Functions fail when using Firebase Admin SDK.
When I am requesting data from firestore using firebase admin SDK, I get this error:
(node:14684) Warning: protos.json not found in any of the include paths \protos,\protos
(Use node --trace-warnings ...
to show where the warning was created)
Error: ENOENT: no such file or directory, open 'protos.json'
at Object.openSync (fs.js:466:3)
at Object.readFileSync (fs.js:369:35)
Can this be fixed?
Currently the admin SDK is not usable on the functions and getServerSideProps
P.S. Locally works just fine when running next dev
but fails when running next build && next start
API route is not passing query string.
Repo:
https://github.com/wei/next-on-netlify-demo-wei
Example:
https://relaxed-mirzakhani-568b34.netlify.app/api/debug/12345?testqs=1
// api/debug/[id].js
export default async ( req, res ) => {
res.json({ query: req.query });
res.end();
};
Expected output
// npm run dev
{
"query": {
"testqs": "1",
"id": "12345"
}
}
Actual output
// npm run netlfy:dev
{
"query": {
"id": "12345"
}
}
A declarative, efficient, and flexible JavaScript library for building user interfaces.
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. πππ
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google β€οΈ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.