Problem with access to sitemap.xml
zorba0517 opened this issue · 0 comments
Problem Definition
- i set up reactSnap in package.json as shown in below.
- i also set up for generating sitemap automoatically in package.json
- sitemap is generated well after deploy process finished.
//package.json
{
"name": "",
"author": "",
"version": "",
"private": true,
"scripts": {
"start:dev": "env-cmd -e development react-scripts start",
"start:prod": "env-cmd -e production react-scripts start",
"build": "react-scripts build",
"postbuild": "react-snap ",
"predeploy": "yarn run sitemap",
"test": "react-scripts test",
"eject": "react-scripts eject",
"lint": "eslint --ext .ts,.tsx ./src",
"lint:fix": "eslint --fix --ext .ts,.tsx ./src",
"sitemap": "babel-node sitemapGenerator.js"
},
"eslintConfig": {
"extends": [
"react-app",
"react-app/jest"
]
},
"browserslist": {
"production": [
">0.2%",
"not dead",
"not op_mini all",
"ie 6-11"
],
"development": [
"last 2 chrome version",
"last 2 firefox version",
"last 2 safari version"
]
},
"dependencies": {
"@emotion/cache": "^11.4.0",
"@emotion/react": "^11.4.1",
...
"worker-loader": "^3.0.8",
"yup": "^0.32.9"
},
"devDependencies": {
"@babel/core": "^7.17.5",
"@babel/eslint-parser": "^7.15.4",
"@babel/node": "^7.16.8",
"@babel/preset-env": "^7.16.7",
...
"prettier": "^2.4.1",
"react-router-sitemap-generator": "^0.0.8",
"react-snap": "^1.23.0"
},
"reactSnap": {
"puppeteerArgs": [
"--no-sandbox",
"--disable-setuid-sandbox"
],
"puppeteerExecutablePath": "/opt/google/chrome/google-chrome",
"include": [
"/",
"/guidelines",
"/dashboard/overview",
"/dashboard/overview/sppb-exams",
"/dashboard/overview/gaitspeed-exams",
...
]
}
}
- but once i tried to access by url directly, i found it reach to html file not sitemap.xml (plz refer to image below)
and also, in google search console says, "Sitemap can be read but Sitemap is HTML~"