netlify redirects
See original GitHub issueI am trying to use a _redirects file for netlify. My question is what should the redirect rules be? In a SPA I only had to do the following rule
/* /index.html 200
However this does not work for my gridsome site. Is there a recommended way that redirect rules should be written?
To add more context, this may not necessarily be an issue with my _redirects file. I believe something is throwing an error when trying to navigate to another page. I am referencing this #289
So as suggested, I add the following code to my gridsome.config.js file
chainWebpack (config) {
config.mode('development')
}
and this is the alarm I get in the console
vue.runtime.esm.js:5190 Uncaught (in promise) DOMException: Failed to execute 'appendChild' on 'Node': This node type does not support this method.
at Object.appendChild (webpack:///./node_modules/vue/dist/vue.runtime.esm.js?:5190:8)
at insert (webpack:///./node_modules/vue/dist/vue.runtime.esm.js?:5501:17)
at createElm (webpack:///./node_modules/vue/dist/vue.runtime.esm.js?:5428:7)
at createChildren (webpack:///./node_modules/vue/dist/vue.runtime.esm.js?:5510:9)
at hydrate (webpack:///./node_modules/vue/dist/vue.runtime.esm.js?:5838:11)
at hydrate (webpack:///./node_modules/vue/dist/vue.runtime.esm.js?:5853:34)
at hydrate (webpack:///./node_modules/vue/dist/vue.runtime.esm.js?:5853:34)
at VueComponent.patch [as __patch__] (webpack:///./node_modules/vue/dist/vue.runtime.esm.js?:5929:17)
at VueComponent.Vue._update (webpack:///./node_modules/vue/dist/vue.runtime.esm.js?:3588:19)
at VueComponent.updateComponent (webpack:///./node_modules/vue/dist/vue.runtime.esm.js?:3676:10)
appendChild @ vue.runtime.esm.js:5190
insert @ vue.runtime.esm.js:5501
createElm @ vue.runtime.esm.js:5428
createChildren @ vue.runtime.esm.js:5510
hydrate @ vue.runtime.esm.js:5838
hydrate @ vue.runtime.esm.js:5853
hydrate @ vue.runtime.esm.js:5853
patch @ vue.runtime.esm.js:5929
Vue._update @ vue.runtime.esm.js:3588
updateComponent @ vue.runtime.esm.js:3676
get @ vue.runtime.esm.js:4062
Watcher @ vue.runtime.esm.js:4051
mountComponent @ vue.runtime.esm.js:3683
Vue.$mount @ vue.runtime.esm.js:7819
init @ vue.runtime.esm.js:2816
hydrate @ vue.runtime.esm.js:5827
hydrate @ vue.runtime.esm.js:5853
hydrate @ vue.runtime.esm.js:5853
patch @ vue.runtime.esm.js:5929
Vue._update @ vue.runtime.esm.js:3588
updateComponent @ vue.runtime.esm.js:3676
get @ vue.runtime.esm.js:4062
Watcher @ vue.runtime.esm.js:4051
mountComponent @ vue.runtime.esm.js:3683
Vue.$mount @ vue.runtime.esm.js:7819
init @ vue.runtime.esm.js:2816
hydrate @ vue.runtime.esm.js:5827
hydrate @ vue.runtime.esm.js:5853
hydrate @ vue.runtime.esm.js:5853
patch @ vue.runtime.esm.js:5929
Vue._update @ vue.runtime.esm.js:3588
updateComponent @ vue.runtime.esm.js:3676
get @ vue.runtime.esm.js:4062
Watcher @ vue.runtime.esm.js:4051
mountComponent @ vue.runtime.esm.js:3683
Vue.$mount @ vue.runtime.esm.js:7819
init @ vue.runtime.esm.js:2816
hydrate @ vue.runtime.esm.js:5827
patch @ vue.runtime.esm.js:5929
Vue._update @ vue.runtime.esm.js:3588
updateComponent @ vue.runtime.esm.js:3676
get @ vue.runtime.esm.js:4062
Watcher @ vue.runtime.esm.js:4051
mountComponent @ vue.runtime.esm.js:3683
Vue.$mount @ vue.runtime.esm.js:7819
init @ vue.runtime.esm.js:2816
hydrate @ vue.runtime.esm.js:5827
patch @ vue.runtime.esm.js:5929
Vue._update @ vue.runtime.esm.js:3588
updateComponent @ vue.runtime.esm.js:3676
get @ vue.runtime.esm.js:4062
Watcher @ vue.runtime.esm.js:4051
mountComponent @ vue.runtime.esm.js:3683
Vue.$mount @ vue.runtime.esm.js:7819
(anonymous) @ entry.client.js:54
(anonymous) @ vue-router.esm.js:1819
(anonymous) @ vue-router.esm.js:1819
(anonymous) @ vue-router.esm.js:1921
step @ vue-router.esm.js:1651
step @ vue-router.esm.js:1658
runQueue @ vue-router.esm.js:1662
(anonymous) @ vue-router.esm.js:1916
step @ vue-router.esm.js:1651
(anonymous) @ vue-router.esm.js:1655
(anonymous) @ vue-router.esm.js:1901
(anonymous) @ vue-router.esm.js:1694
(anonymous) @ vue-router.esm.js:1770
Promise.then (async)
(anonymous) @ vue-router.esm.js:1717
(anonymous) @ vue-router.esm.js:1738
(anonymous) @ vue-router.esm.js:1738
flatMapComponents @ vue-router.esm.js:1737
(anonymous) @ vue-router.esm.js:1673
iterator @ vue-router.esm.js:1880
step @ vue-router.esm.js:1654
step @ vue-router.esm.js:1658
runQueue @ vue-router.esm.js:1662
confirmTransition @ vue-router.esm.js:1909
transitionTo @ vue-router.esm.js:1811
init @ vue-router.esm.js:2428
beforeCreate @ vue-router.esm.js:532
invokeWithErrorHandling @ vue.runtime.esm.js:1702
callHook @ vue.runtime.esm.js:3825
Vue._init @ vue.runtime.esm.js:4496
Vue @ vue.runtime.esm.js:4570
createApp @ app.js:90
(anonymous) @ entry.client.js:22
./node_modules/gridsome/app/entry.client.js @ app.12303bfc.js:2530
__webpack_require__ @ app.12303bfc.js:84
(anonymous) @ entry.client.js:1
0 @ app.12303bfc.js:3431
__webpack_require__ @ app.12303bfc.js:84
checkDeferredModules @ app.12303bfc.js:46
(anonymous) @ app.12303bfc.js:218
(anonymous) @ app.12303bfc.js:221
Show 37 more frames
vue.runtime.esm.js:1734 TypeError: Cannot read property '_isDestroyed' of undefined
at destroy (vue.runtime.esm.js:2855)
at invokeDestroyHook (vue.runtime.esm.js:5571)
at invokeDestroyHook (vue.runtime.esm.js:5576)
at invokeDestroyHook (vue.runtime.esm.js:5576)
at invokeDestroyHook (vue.runtime.esm.js:5576)
at invokeDestroyHook (vue.runtime.esm.js:5576)
at invokeDestroyHook (vue.runtime.esm.js:5576)
at VueComponent.patch [as __patch__] (vue.runtime.esm.js:5903)
at VueComponent.Vue.$destroy (vue.runtime.esm.js:3644)
at destroy (vue.runtime.esm.js:2857)
Issue Analytics
- State:
- Created 4 years ago
- Reactions:1
- Comments:8 (2 by maintainers)
Top Results From Across the Web
Redirects and rewrites - Netlify Docs
You can customize and alter the redirect behavior by adding options to the end of each line such as HTTP status code, country...
Read more >Redirect options - Netlify Docs
Role-based redirects let you restrict access to certain paths of your ...
Read more >Setting up redirects on Netlify
Learn how to configure redirects and rewrites for your Netlify sites.
Read more >How to do redirects on Netlify
You can configure redirects and rewrite rules for your Netlify site by adding a _redirects file to the root of your site folder...
Read more >Getting started configuring redirects - Jamstack Explorers
Take control of URL routing at the Netlify Edge by adding redirect configuration to your projects. To get started we'll explore:.
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
@hacknug Thank you adding the hidden input with the form-name did the trick.
The hidden
<input>
trick works, so thanks @hacknug for that. Here the docs mention having to do this with a JS rendered page, as would be the case for a typical client-side SPA.But my understanding is that Gridsome is working as a JAMstack - generating static files that we should be able to just upload via traditional FTP, etc.
So, if that’s the case, then all of the
<form>
should already be ‘rendered’ via HTML and be ready for Netlify.So, Y is this ‘trick’ necessary? 😕